Hi....
I am working in c# and face a problem in virtual method. How can we define Virtual Method and describe syntax?
Loading
Know the answer? Post it — somebody with the same question will find it here.
Sign in to answer this question
It is the same account you read, post and publish with — and you will come straight back to this page.
Posted Jan 12, 2012, 10:08 AM
VulpesPosted Jan 12, 2012, 9:46 AM
Posted Jan 12, 2012, 9:17 AM
Datta KharadPosted Jan 11, 2012, 6:10 AM
Virtual keyword:-
The virtual keyword allows polymorphism too. A virtual property or method has an implementation in the base class, and can be overriden in the derived classes.
To create a virtual member in C#, use the virtual keyword:
public virtual void Draw()