Essential C# nameof Operator  Suggest an edit

Applied to qualified identifiers

Snippet

Console.WriteLine(nameof(CompanyNamespace.MyNamespace));
Console.WriteLine(nameof(MyClass));
Console.WriteLine(nameof(MyClass.MyNestedClass));
Console.WriteLine(nameof(MyNamespace.MyClass.MyNestedClass.MyStaticProperty));

Console Output

MyNamespace MyClass MyNestedClass MyStaticProperty

Table Of Contents
9 nameof Operator
22 Enum
25 GUID
107 Stream
108 Timers
  ↑ ↓ to navigate     ↵ to select     Esc to close