this code will help you how to implement what Christian Graus said.
using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Reflection;
public partial class Default2 : System.Web.UI.Page
{
protected void Page_Load(object sender, EventArgs e)
{
PropertyInfo[] pinfo = typeof(MYClass).GetProperties();
}
}
public class MYClass
{
public MYClass()
{ }
public int MyProperty1 { get; set; }
public int MyProperty2 { get; set; }
public int MyProperty3 { get; set; }
}