class Program
{
static void Main(string[] args)
{
Person person = Activator.CreateInstance<Person>();
System.Reflection.PropertyInfo[] propertyInfos = person.GetType().GetProperties();
foreach (System.Reflection.PropertyInfo property in propertyInfos)
{
Console.WriteLine($"Property:{property.Name};PropertyType:{property.PropertyType};PropertyTypeName:{property.PropertyType.Name};");
}
Console.WriteLine();
Console.ReadKey();
}
}
public class Person
{
public int ID { get; set; }
public string Name { get; set; }
public bool boolName { get; set; }
public decimal decimalName { get; set; }
public DateTime DateTimeName { get; set; }
public Double DoubleName { get; set; }
public float FloatName { get; set; }
public TimeSpan TimeSpanName { get; set; }
}