The page says
Beginning with C# 11, you can use a nameof expression with a method parameter inside an attribute on a method or its parameter.
This is not 100% correct. A nameof expression with a method parameter inside an attribute even works with C# versions before 11 as long as you use a compiler that knows C# 11.
Reference: dotnet/roslyn#65379 (comment)
Document Details
⚠ Do not edit this section. It is required for learn.microsoft.com ➟ GitHub issue linking.