CSharp examples for Custom Type:nameof
Use nameof on various parts of a class
using System;/*from www . j a v a 2 s . co m*/ using System.ComponentModel; class SimpleNameof { private string field; static void Main(string[] args) { Console.WriteLine(nameof(SimpleNameof)); Console.WriteLine(nameof(Main)); Console.WriteLine(nameof(args)); Console.WriteLine(nameof(field)); } }