I have following two class which is already inherited to XYZ
Country Class
public class country_master : XYZ
{
private string _id;
public string id
{
get { return _id; }
set { _id = value; }
}
private string _country_code;
public string country_code
{
get { return _country_code; }
set { _country_code = value; }
}
private string _country_name;
public string country_name
{
get { return _country_name; }
set { _country_name = value; }
}
}
State Class
public class state_master: XYZ
{
private string _id;
public string id
{
get { return _id; }
set { _id = value; }
}
private string _state_code;
public string state_code
{
get { return _state_code; }
set { _state_code= value; }
}
private string _state_name;
public string state_name
{
get { return _state_name; }
set { _state_name= value; }
}
}
- Now, I want to use
country_namein mystate_masterclass how it is possible?
Thank You.
state_master?state_mastercan use onlyXYEproperties, if you wanna usecountry_nameyou can have an instanace ofcountry_masteras a property in yourstate_masterclass, or maybe movecountry_nametoXYZclass.