A
Arun Balakrishnan (Azure)
Guest
Hi,
I have two classes Class1 and Class2. Class2 has included as property in Class1.
public class Class1
{
public string EmpName { get; set; }
public string LastName { get; set; }
public string Designation { get; set; }
[SubModelAttribute]
public Class2 Details { get; set; }
}
public class Class2
{
public decimal Salary { get; set; }
public DateTime CreatedDate { get; set; }
public string CharColumn { get; set; }
}
I can read all properties in Class1 by using below code.
Class1 obj = new Class1();
Var prop = obj.GetType().GetProperties();
But I want to read all properties of Class2 from Class1.
Thanks in advance
Continue reading...
I have two classes Class1 and Class2. Class2 has included as property in Class1.
public class Class1
{
public string EmpName { get; set; }
public string LastName { get; set; }
public string Designation { get; set; }
[SubModelAttribute]
public Class2 Details { get; set; }
}
public class Class2
{
public decimal Salary { get; set; }
public DateTime CreatedDate { get; set; }
public string CharColumn { get; set; }
}
I can read all properties in Class1 by using below code.
Class1 obj = new Class1();
Var prop = obj.GetType().GetProperties();
But I want to read all properties of Class2 from Class1.
Thanks in advance
Continue reading...