I need a solution for multiple inheritance. I know that I can use interfaces. This would be a good solution, but ... ... I need the ability to change the level of protection, but the interface fields must be public ...
For instance:
I have
interface IInterface_1 { string field_1{set;get;} string field_2{set;get;} } interface IInterface_2 { string field_3{set;get} string field_4{set;get} }
And in the main class I need to hide some fields
class MainClass : IInterface_1, IInterface_2 { public string field_1{set;get;} private string field_2{set;get;} public string field_3{set;get} public string field_4{set;get} }
Do you have a solution for this?
source share