using System; namespace ex1 { class ex1 { public static int GetValue(string Name) { Console.WriteLine("GetValue for {0}",Name); return 99; } public class a { int aint = GetValue("aint"); static a () { Console.WriteLine("Static Constructor a"); } static int staint = GetValue("staint"); public a () { Console.WriteLine("Constructor a"); } } public class b : a { static int stbint = GetValue("stbint"); int cint = GetValue("bint"); static b () { Console.WriteLine("Static Constructor b"); } public b () { Console.WriteLine("Constructor b"); } } public class c : b { static int stcint = GetValue("stcint"); int cint = GetValue("cint"); static c() { Console.WriteLine("Static Constructor c"); } public c(int v) { stcint = v; } public c() : this(1) { Console.WriteLine("Constructor c"); } } static void Main(string[] args) { c obj = new c(); Console.ReadKey(); } } }