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_name
in mystate_master
class how it is possible?
Thank You.
state_master
? – doctorlovestate_master
can use onlyXYE
properties, if you wanna usecountry_name
you can have an instanace ofcountry_master
as a property in yourstate_master
class, or maybe movecountry_name
toXYZ
class. – Badro Niaimi