19.7.3.Using Type.GetProperties() to Obtain an Object's Public Properties
using System;
class MainClass
{ static void Main()
{
DateTime dateTime = new DateTime();
Type type = dateTime.GetType();
foreach (
System.Reflection.PropertyInfo property in
type.GetProperties())
{
System.Console.WriteLine(property.Name);
}
}
}