Logo 
Search:

C# FAQ

Submit Interview FAQ
Home » Interview FAQ » C#RSS Feeds

How do I declare a pure virtual function in C#?

  Shared By: Jarrod Williams    Date: Jan 01    Category: C#    Views: 1698

Answer:

Use the abstract modifier on the method. The class must also be marked as abstract. Note that abstract methods cannot have an implementation (unlike pure virtual C++ methods).

Share: 
 

Didn't find what you were looking for? Find more on How do I declare a pure virtual function in C#? Or get search suggestion and latest updates.


Your Comment
  • Comment should be atleast 30 Characters.
  • Please put code inside [Code] your code [/Code].


Tagged: