-
Notifications
You must be signed in to change notification settings - Fork 5.9k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Extended nameof scope works in C# 8? #36980
Comments
Hi @RajaniCode Adding @jcouv and @333fred to make sure my analysis below is correct. This is an instance where the results using the My plan is to close this as not a docs issue, but I'll wait for others to weigh in. |
@BillWagner is correct. |
closing as by design |
Two cents: .NET legacy, more than a decade ago. |
Extended nameof scope works in C# 8?
Please refer to the following output of the code snippet (provided below the output) running on Visual Studio 2022 Community Edition for Apple Silicon, MacBook Pro M1 Pro, macOS Ventura Version 13.5.2 (22G91).
NB:
The code snippet comments include compiler errors for features greater than C# 8 (C# 9, C# 10, and C# 11) only to find out if "extended nameof scope" works in C# 8?
Output
/**********************************************************************************************************************/
OS Information:
Platform: Unix
Version String: Unix 22.6.0.0
Version Information:
Major: 22
Minor: 6
Service Pack: ''
Environment.Version: 3.1.28
RuntimeInformation.FrameworkDescription: .NET Core 3.1.28
Extended nameof scope
nameof expression with a method parameter
/**********************************************************************************************************************/
Code Snippet
/**********************************************************************************************************************/
/**********************************************************************************************************************/
The text was updated successfully, but these errors were encountered: