AcornPublishing_essential-csharp-7e/EssentialCSharp-8.0/src/Chapter18/Listing18.01.UsingTypeGetPropertiesToObtainAnObjectsPublicProperties.cs
namespace AddisonWesley.Michaelis.EssentialCSharp.Chapter18.Listing18_01
{
    using System;
    using System.Reflection;

    public class Program
    {
        public static void Main()
        {
            DateTime dateTime = new DateTime();

            Type type = dateTime.GetType();
            foreach(
                System.Reflection.PropertyInfo property in
                    type.GetTypeInfo().GetProperties())
            {
                Console.WriteLine(property.Name);
            }
        }
    }
}