dimanche 21 juin 2015

How to get name and values of properties of properties of Class in c# through reflection

Public class Person
{
public string name{get;set;} //get this via Model class
;

;
}

public class Employee
{
public Person person{get;set}
}

public class Model:Employee
{
} 

Model model=new model();

I need to get the names and values of properties of Person class via model class through reflection.How to do it?





Aucun commentaire:

Enregistrer un commentaire