Even though Iam in a derived class which should get me access to the derived protected members, I get the error
"Cannot access protected method 'BaseMethod' from here"
when trying to call other.BaseMethod();
.
Can I get around this without having to make BaseMethod
public? I also cannot make the method internal
, since Base
and Derived
are in different assemblies.
class Base
{
protected void BaseMethod() { }
}
class Derived: Base
{
public void Doit(Base other)
{
other.BaseMethod();
}
}