Posted on: 1/7/2015 2:21:14 PM | Views : 558

asp.net.4 webForms , c# vs2012
i cant get the class props by reflection..
i tried to follow the http://msdn.microsoft.com/en-us/library/kyaxdd3x(v=vs.110).aspx

and i get 0 in the results array length..
protected void Page_Load(object sender, EventArgs e) { string prop1="1", prop2="2"; Class1 c = new Class1(prop1, prop2); Type t = typeof(Class1); var rr = t.GetType().Attributes.GetType().GetProperties(); var r = t.GetType().GetProperties(System.Reflection.BindingFlags.Public); System.Reflection.PropertyInfo[] propInfos = t.GetProperties(System.Reflection.BindingFlags.Public | System.Reflection.BindingFlags.Instance);
and the class

public class Class1 { private string prop1 { get; set; } private string prop2 { get; set; } public Cl ...

Go to the complete details ...