Add fullnameof() similar to nameof() #6828
-
I use "nameof()" often for use in constants, strings, logging, etc. It's a very convenient way to keep values and documentation up-to-date when using common Visual Studio refactoring tools. There are infinite examples, but here's one:
It would be incredibly useful to also allow for the fully qualified type name to be used compile-time. Something like In this StackOverflow, it was said that this has been discussed in the past, and the Type.GetFullName() API was considered good enough. I would disagree because the power of "name()" is that it can be used during compile-time. |
Beta Was this translation helpful? Give feedback.
Replies: 2 comments
-
This is a duplicate of #701. |
Beta Was this translation helpful? Give feedback.
-
I'm proposing making It would be great to hear in that thread about real-world use cases that support doing this, as well as real-world use cases for |
Beta Was this translation helpful? Give feedback.
This is a duplicate of #701.