Virtual methods have an implementation and provide derived classes with the ability to override them. Abstract methods do not provide an implementation and force derived classes to override a method.
So, abstract methods do not have real code in them, and HAVE TO subclasses override the method. Virtual methods can have code, which is usually the default implementation, and any subclasses MAY override the method using the override modifier and provide a custom implementation.
public abstract class E { public abstract void AbstractMethod(int i); public virtual void VirtualMethod(int i) {
Dennisch Feb 06 '13 at 12:23 2013-02-06 12:23
source share