Some say here that if members are protected you can access them: Are private members inherited in C#?
Did someone really tried ?
I have tried it doesn't even work with protected:
public partial class Base
{
protected IObject myObject;
}
If I derive (Base is in another namespace but it shouldn't matter I of course import that namespace)
public partial class Derive: Base
{
}
Intellisense doesn't show myObject in Derive Class.
So what I can do if I need a myObjhect member in all my derived classes to call some methods upon ? If I have to duplicate that member then what's the use of inheritance ?
Update: I forgot Derive:Base but that was just mystypo, of course I did that.