public static void Test() { object x1 = new Recursive2 <int, int>(null); object x2 = new Mixed2 <int, int>(null, null, null); object x3 = new NonRecursive2 <int, int>(null); object x4 = new Expansive2 <int, int>(null); object y1 = new Recursive2 <string, string>(null); object y2 = new Mixed2 <string, string>(null, null, null); object y3 = new NonRecursive2 <string, string>(null); object y4 = new Expansive2 <string, string>(null); }
public Mixed2(Mixed2 <A, B> a1, Mixed2 <int, int> a2, Mixed2 <B, A> a3) { f1 = a1; f2 = a2; f3 = a3; }
private static void OtherSizes() { Console.WriteLine(); long diff; long before = GC.GetTotalMemory(true); Empty obj = new Empty(); long after = GC.GetTotalMemory(true); diff = after - before; Console.WriteLine("Empty: \t\t" + diff); //--------------------------------------- before = GC.GetTotalMemory(true); EmptyWithMethods obj0 = new EmptyWithMethods(); after = GC.GetTotalMemory(true); diff = after - before; Console.WriteLine("EmptyWithMethods: " + diff); //--------------------------------------- before = GC.GetTotalMemory(true); OneInt32 obj1 = new OneInt32(); after = GC.GetTotalMemory(true); diff = after - before; Console.WriteLine("OneInt32: \t" + diff); //--------------------------------------- before = GC.GetTotalMemory(true); TwoInt32 obj2 = new TwoInt32(); after = GC.GetTotalMemory(true); diff = after - before; Console.WriteLine("TwoInt32: \t" + diff); //--------------------------------------- before = GC.GetTotalMemory(true); ThreeInt32 obj3 = new ThreeInt32(); after = GC.GetTotalMemory(true); diff = after - before; Console.WriteLine("ThreeInt32: \t" + diff); //--------------------------------------- before = GC.GetTotalMemory(true); Mixed1 obj4 = new Mixed1(); after = GC.GetTotalMemory(true); diff = after - before; Console.WriteLine("Mixed1: \t" + diff); //--------------------------------------- before = GC.GetTotalMemory(true); Mixed2 obj5 = new Mixed2(); after = GC.GetTotalMemory(true); diff = after - before; Console.WriteLine("Mixed2: \t" + diff); //--------------------------------------- before = GC.GetTotalMemory(true); Mixed3 obj6 = new Mixed3(); after = GC.GetTotalMemory(true); diff = after - before; Console.WriteLine("Mixed3: \t" + diff); //--------------------------------------- }