Hi....
I am working in c# and face a problem in virtual method. How can we define Virtual Method and describe syntax?
Virtual Keywords
4 Answers
Know the answer? Post it. Somebody with the same question will find it here.
Know the answer? Post it. Somebody with the same question will find it here.
Answer a question in the forums and earn +20 SHARP for every answer.
See unanswered questions
DevSocialUpcoming · 3rd editionAI Agents ConferenceDec 1–3, 2026Live onlineFree to attend5days leftRegister
Datta KharadRank #2,135 · 668 reputationPosted Jan 11, 2012, 1:10 AM EST
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()
Posted Jan 12, 2012, 4:17 AM EST
VulpesRank #55 · 29.2K reputationPosted Jan 12, 2012, 4:46 AM EST
Posted Jan 12, 2012, 5:08 AM EST