Tommaso Caldarola wrote:
public abstract class A
{
public virtual MethodOne()
{
}
public void AbstractMethod();
}
public abstract class B : A
{
// How to hide MethodOne and AbstractMethod?
}
You can hide them in terms of creating a new method which will be
called if the type is known to be B at compile time, but where A's
version will be called if the type is only known to be A at
compile-time. However, you can't hide them in terms of preventing
people from calling them. Doing so would violate Liskov's Substitution
Principle - you should always be able to treat a derived type as the
base type.
Jon