venu k

venu k

  • NA
  • 48
  • 2.9k

get the Inner object values by System.Reflection.PropertyInf

Dec 12 2013 2:26 AM
i was getting exception when ever try to read the inner object values at 
 what ever we passing 
Object1 parameter has multiple Objects.

 Collapse | Copy Code
public static void WritePDF<T>(T Object1 ,int RrcordID) {
Type type = typeof(T);

foreach (System.Reflection.PropertyInfo property in type.GetProperties())
{ svalue = type.GetProperty(property.Name).GetValue(Object1, null).ToString();
}
} before this i need to check it and get the inner object value ,How ?

Answers (1)