Difference between an abstract method & virtual method
Ranjithkumar Murugesan
abstract:- abstract method can not declare any body and variables in abstract class and abstract method implemented in child class by override keyword . virtual:- we can can declares any body and variables in virtual method it can be also implemented method in child class using override keyword.
ewwe
http://softwarecafeblog.blogspot.in/2011/05/abstract-vs-virtual-in-c.html
Please refer to the following URL to know the differences between Abstract Method and Virtual Method,http://onlydifferencefaqs.blogspot.in/2012/08/oops-difference-faqs-3.html
Virtual method has an implementation & provide the derived class with the option of overriding it. Abstract method does not provide an implementation & forces the derived class to override the method. important Notes: (a)Any Class with abstract method or property in it must be declared abstract (b)Attempting to instantiate an object of an abstract class retults in a compilation error Example:
Shape m_MyShape = new Shape(); //it is Wrong to that.
But we can do that.
Shape m_MyShape = new Circle(); // True
Or
Shape m_MyShape;
/*
declare refrences only, and the refrences can refer to intances of
any concrete classes derived from abstract class
*/
Circle m_MyCircle = new Circle();
m_MyShape = m_MyCircle; // Also True