最佳答案
In C# 6, you can use the nameof()
operator to get a string containing the name of a variable or a type.
Is this evaluated at compile-time, or at runtime via some Roslyn API?