Also, a class in which you define an abstract member must itself be abstract because abstract members must be implemented.
Code:
abstract class AbstractClass
{
protected void NotModifiedMethod() { }
protected abstract void AbstractMethod();
protected virtual void VirtualMethod() { }
}
class ConcreteClass : AbstractClass
{
//This HAS to be overriden because it's abstract
protected override void AbstractMethod() { }
//This CAN be overriden because it's virtual
protected override void VirtualMethod()
{
base.VirtualMethod();
}
//You CAN NOT do this, because NotModifiedMethod is not
//marked as abstract or virtual
protected override void NotModifiedMethod() { }
}
-Peter
peterlanoie.blog