Base class' constructor takes effect even not explicitly called.
I almost have no impression at all on a heavily important c# grammar issue......
Originally I thought base class' constructor doesn't participate in any of derived class' constructional logic unless explicitly called for serving , just like :
public Manager(int initialdata) : base() { //Add further instructions here. }In this manner the default constructor is to be called undoubtedly. However in my bad conception I think code like this:
public Manager(int initialdata) { //Add further instructions here. }doesn't call the base class' default constructor because there is no explicit code ":base()" coming after main class name "Manager" so the base default constructor has no impact here.
However I am wrong. The two pieces above are semantically identical. Official tutorial tells me:
In a derived class, if a base-class constructor is not called explicitly using the base keyword, then the default constructor, if there is one, is called implicitly.Here is official link stating this case:
Using Constructors (C# Programming Guide)