The execution sequence after inheritance.
Using System; namespace Test {// if the parent class is not constructed by default, The subclass must explicitly call the parameter-Containing Structure of the parent class in its constructor to ensure smooth instantiation of the subclass object! Public class MyClass {static MyClass () {Console. writeLine ("MyClass: Default static constructor");} public MyClass () {Console. writeLine ("MyClass: default constructor");} public MyClass (int a, int B) {Console. writeLine ("MyClass with parameter construction: a = {0}, B = {1 }. ", a, B) ;}} public class MyClass2: MyClass {static MyClass2 () {Console. writeLine ("MyClass2: Default static constructor");} public MyClass2 () {Console. writeLine ("MyClass2: default constructor");} public MyClass2 (int a, int B) {Console. writeLine ("MyClass2 with parameter construction: a = {0}, B = {1 }. ", a, B) ;}} public class MyClass3: MyClass2 {static MyClass3 () {Console. writeLine ("MyClass3: Default static constructor");} public MyClass3 () {Console. writeLine ("MyClass3: default constructor");} public MyClass3 (int a, int B) {Console. writeLine ("MyClass3 with parameter construction: a = {0}, B = {1 }. ", a, B) ;}} public class runMyApp {static void Main () {MyClass3 my = new MyClass3 (3, 4 );}}}