I have read about virtual methods in C#. Is there any concept called virtual class in C#? Is abstract class in C# and virtual class in C++ the same?
Asked
Active
Viewed 2.3k times
3 Answers
19
There is no such thing in C# - and it's really not necessary since multiple implementation inheritance is not supported. Making a class abstract really only means that you cannot create instances of that class and they might not be fully implemented (e.g. might contain abstract methods).

BrokenGlass
- 158,293
- 28
- 286
- 335
3
I will opine with a link to this earlier SO post: In C++ what is a virtual base class?
As others have mentioned, since C# does not have multiple inheritance, the need to have a "virtual base class" that limits multiple inheritance is not needed, hence it does not apply to C#. Only members in C# can be virtual.

Community
- 1
- 1

Isaiah Nelson
- 2,450
- 4
- 34
- 53