I’m trying to extend a class, then use a method from base class, but i can’t see it.
My Code:
class A {
protected void Foo(){}
}
class B : A {}
class C{
void Bar(){
B b = new B();
b.Foo();
}
}
How could i use b.Foo in C?
You can’t. Foo is a protected member function of class A, and as such can only be used from within class A, or from within a class that inherits from it.