nameof
class Program { static void Main(string[] args) { Console.WriteLine(nameof(Student)); Console.WriteLine(nameof(Student.A)); Console.WriteLine(nameof(Student.B)); Console.WriteLine(nameof(Student.C)); Console.Read(); } public class Student { public string A => ""; public int B => 0; public DateTime C => DateTime.MinValue; } }