protectedmeans that does not mean that client code can access it through an instance of a derived class.
It does mean that the code of the derived class can use it. For example, this would be true:
public class B : A
{
public void SomeMethod()
{
Method();
}
}
If you want your exact code sample to work, mark Methodhow public.
source
share