I need function, that returns {obj type name}.{property name}.{property name}.. For example:
class City {
public string Name {get;set;}
}
class Country {
public string Name {get;set;}
public City MyCity {get;set;}
}
var myCountry = new Country() {
Name="Ukraine",
MyCity = new City() {
Name = "Kharkov"
}
}
So my function should return "{Country.Name}" or "{Country.MyCity.Name}" depends on input parameter. What is the way to do it?