When using simple syntax to initialize fields of derived classes by directly assigning values to them, the compiler emits IL code that first initializes the fields of the derived class and then calls base.ctor. Why does it not call the base.ctor field and initialize the fields of the derived class. What if I had fields that depend on the fields of the base class?
I would like to post a sample code here, but I am posting this question from my mobile phone.
source
share