static void Main(string[] args) { Student newStudent = new Student(); Type type = newStudent.GetType(); foreach (var item in type.GetProperties()) { Console.WriteLine(item); } }