Difference between MustInherit and Abstract Class

2019-06-15 00:26发布

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?

2条回答
贼婆χ
2楼-- · 2019-06-15 00:41

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

查看更多
Juvenile、少年°
3楼-- · 2019-06-15 00:43

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

abstract (C# Reference)

MustInherit (Visual Basic)

查看更多
登录 后发表回答