How to call subclass constructor only in inheriten

2019-06-14 21:01发布

问题:

Is there any possibility in inheritance in c# so that we can have subclass constructor call only without calling base class constructor as a default base class constructor calls firstly

回答1:

A subclass constructor will always call a superclass constructor: either the default superclass constructor or a (maybe parametrized) superclass constructor, which can be chosen by you, when you declare your subclass constructor.



标签: c# oop