Skip to content
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

Is it possible to support nameof operator? #98

Closed
cesaryuan opened this issue Mar 12, 2021 · 4 comments
Closed

Is it possible to support nameof operator? #98

cesaryuan opened this issue Mar 12, 2021 · 4 comments
Assignees

Comments

@cesaryuan
Copy link

Is it possible to support nameof operator to get the variable name?

Console.WriteLine(nameof(System.Collections.Generic));  // output: Generic
Console.WriteLine(nameof(List<int>));  // output: List
Console.WriteLine(nameof(List<int>.Count));  // output: Count
Console.WriteLine(nameof(List<int>.Add));  // output: Add

var numbers = new List<int> { 1, 2, 3 };
Console.WriteLine(nameof(numbers));  // output: numbers
Console.WriteLine(nameof(numbers.Count));  // output: Count
Console.WriteLine(nameof(numbers.Add));  // output: Add
@JonathanMagnan JonathanMagnan self-assigned this Mar 12, 2021
@JonathanMagnan
Copy link
Member

Hello @cesaryuan ,

We will look at it.

Best Regards,

Jon

@JonathanMagnan
Copy link
Member

Hello @cesaryuan ,

The v4.0.36 has been released.

Could you try it and let us know if everything is working as expected for the nameof operator?

Best Regards,

Jon

@JonathanMagnan
Copy link
Member

Hello @cesaryuan ,

Since our last conversation, we haven't heard from you!

Did you get the chance to try the v4.0.36?

Don't hesitate to contact us for further assistance,

Jon

@cesaryuan
Copy link
Author

I'm sorry to reply to you so late. I've tried and it performs well. Thank you.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

No branches or pull requests

2 participants