nameof Operator
Compile-time names, refactoring safety, traps
nameof(x) (C# 6) returns the simple, unqualified name of a variable, type, member or namespace as a compile-time constant string: nameof(order.Total) is "Total", nameof(List) is "List". The expression is never evaluated, so there…