简体   繁体   English

MustInherit和抽象类之间的区别

[英]Difference between MustInherit and Abstract Class

Could someone please explain to me the differences between an abstract class and a class marked MustInherit? 有人可以向我解释抽象类和标记为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? 那么为什么要使用一个而不是另一个呢?

MustInheritVB.NET因为abstractC#

MustInherit is VB.NET and abstract is c# - they are modifiers that declare the same thing. MustInherit是VB.NET, abstract是c# - 它们是声明相同内容的修饰符。

abstract (C# Reference) 摘要(C#参考)

MustInherit (Visual Basic) MustInherit(Visual Basic)

暂无
暂无

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题 接口和抽象类在解耦方面的区别? - Difference between Interface and Abstract class in terms of Decoupling? 抽象类的对象和抽象类的对象列表之间有什么区别? - What is the difference between object of an abstract class and list of objects of abstract class? 构造函数需要参数的抽象类与具有抽象get-only属性的抽象类之间的区别 - Difference between abstract class whose constructor requires arguments, and abstract class with abstract get-only properties 在基类中使用mustinherit属性 - using a mustinherit property in base class 简单基类和抽象类有什么区别? - What is the difference between a simple base class and abstract class? 使用抽象类作为方法参数和约束到所述抽象类的泛型参数之间是否有任何明显的区别? - Is there any appreciable difference between using an abstract class as a method parameter and generic parameter constrained to said abstract class? C#hack:接口和抽象类之间的低级别差异 - C# hack: low level difference between interface and abstract class 抽象类和静态类有什么区别? - What's the difference between an abstract class and a static one? 从抽象类和非抽象类派生的差异 - Difference in deriving from abstract and non abstract class 抽象类和只有受保护构造函数的类之间有什么区别? (。净) - What's the difference between an abstract class, and a class with only protected constructors? (.NET)
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM