Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Difference between MustInherit and Abstract Class

Could someone please explain to me the differences between an abstract class and a class marked MustInherit?

Both can implement shared and instance constructors and logic. Both can/must be inherited.

So why use one over the other and what is the difference?

like image 690
Maxim Gershkovich Avatar asked Mar 04 '11 03:03

Maxim Gershkovich


2 Answers

MustInherit is to VB.NET as abstract is to C#

like image 159
smartcaveman Avatar answered Sep 28 '22 10:09

smartcaveman


MustInherit is VB.NET and abstract is c# - they are modifiers that declare the same thing.

abstract (C# Reference)

MustInherit (Visual Basic)

like image 25
CRice Avatar answered Sep 28 '22 10:09

CRice