2 // Microsoft (R) .NET Framework IL Disassembler. Version 4.6.1055.0
3 // Copyright (c) Microsoft Corporation. All rights reserved.
7 // Metadata version: v4.0.30319
8 .assembly extern mscorlib
10 .publickeytoken = (B7 7A 5C 56 19 34 E0 89 ) // .z\V.4..
13 .assembly diamondshape
15 .custom instance void [mscorlib]System.Runtime.CompilerServices.CompilationRelaxationsAttribute::.ctor(int32) = ( 01 00 08 00 00 00 00 00 )
16 .custom instance void [mscorlib]System.Runtime.CompilerServices.RuntimeCompatibilityAttribute::.ctor() = ( 01 00 01 00 54 02 16 57 72 61 70 4E 6F 6E 45 78 // ....T..WrapNonEx
17 63 65 70 74 69 6F 6E 54 68 72 6F 77 73 01 ) // ceptionThrows.
19 // --- The following custom attribute is added automatically, do not uncomment -------
20 // .custom instance void [mscorlib]System.Diagnostics.DebuggableAttribute::.ctor(valuetype [mscorlib]System.Diagnostics.DebuggableAttribute/DebuggingModes) = ( 01 00 07 01 00 00 00 00 )
22 .hash algorithm 0x00008004
25 .module diamondshape.exe
26 // MVID: {25B467F3-D284-4DB6-BAD4-C7EAC75CF064}
28 .file alignment 0x00000200
29 .stackreserve 0x00100000
30 .subsystem 0x0003 // WINDOWS_CUI
31 .corflags 0x00000001 // ILONLY
32 // Image base: 0x010B0000
35 // =============== CLASS MEMBERS DECLARATION ===================
37 .class interface private abstract auto ansi IFoo
39 .method public hidebysig newslot virtual
40 instance int32 Foo(int32 a) cil managed
44 .locals init (int32 V_0)
52 } // end of method IFoo::Foo
54 } // end of class IFoo
56 .class interface private abstract auto ansi IFoo2
59 .method public hidebysig newslot virtual final
60 instance int32 Foo(int32 a) cil managed
63 // Code size 20 (0x14)
65 .locals init (int32 V_0)
67 IL_0001: ldstr "At IFoo2.Foo"
68 IL_0006: call void [mscorlib]System.Console::WriteLine(string)
78 } // end of method IFoo2::IFoo.Foo
80 } // end of class IFoo2
82 .class interface private abstract auto ansi IFooEx
85 .method public hidebysig newslot virtual final
86 instance int32 IFoo.Foo(int32 a) cil managed
89 // Code size 20 (0x14)
91 .locals init (int32 V_0)
93 IL_0001: ldstr "At IFooEx.Foo"
94 IL_0006: call void [mscorlib]System.Console::WriteLine(string)
100 IL_0010: br.s IL_0012
104 } // end of method IFooEx::IFoo.Foo
105 } // end of class IFooEx
107 .class private auto ansi beforefieldinit FooClass
108 extends [mscorlib]System.Object
113 .method public hidebysig specialname rtspecialname
114 instance void .ctor() cil managed
119 IL_0001: call instance void [mscorlib]System.Object::.ctor()
122 } // end of method FooClass::.ctor
124 } // end of class FooClass
126 .class interface private abstract auto ansi I1
128 .method public hidebysig newslot abstract virtual
129 instance int32 Func(int32 a) cil managed
131 } // end of method I1::Func
135 .class interface private abstract auto ansi I2
138 .method private hidebysig newslot virtual final
139 instance int32 I1.Func(int32 a) cil managed
142 // Code size 20 (0x14)
144 .locals init (int32 V_0)
146 IL_0001: ldstr "At I2.Func"
147 IL_0006: call void [mscorlib]System.Console::WriteLine(string)
153 IL_0010: br.s IL_0012
157 } // end of method I2::I1.Func
160 .class interface private abstract auto ansi I3
163 .method private hidebysig newslot virtual final
164 instance int32 I1.Func(int32 a) cil managed
167 // Code size 20 (0x14)
169 .locals init (int32 V_0)
171 IL_0001: ldstr "At I3.Func"
172 IL_0006: call void [mscorlib]System.Console::WriteLine(string)
178 IL_0010: br.s IL_0012
182 } // end of method I3::I1.Func
185 .class interface private abstract auto ansi I4
190 .method private hidebysig newslot virtual final
191 instance int32 I1.Func(int32 a) cil managed
194 // Code size 20 (0x14)
196 .locals init (int32 V_0)
198 IL_0001: ldstr "At I4.Func"
199 IL_0006: call void [mscorlib]System.Console::WriteLine(string)
205 IL_0010: br.s IL_0012
209 } // end of method I4::I1.Func
212 .class private auto ansi beforefieldinit I4Class
213 extends [mscorlib]System.Object
219 .method public hidebysig specialname rtspecialname
220 instance void .ctor() cil managed
225 IL_0001: call instance void [mscorlib]System.Object::.ctor()
228 } // end of method I4Class::.ctor
230 } // end of class I4Class
232 .class interface private abstract auto ansi I5
235 .method private hidebysig newslot virtual final
236 instance int32 I1.Func(int32 a) cil managed
239 // Code size 20 (0x14)
241 .locals init (int32 V_0)
243 IL_0001: ldstr "At I5.Func"
244 IL_0006: call void [mscorlib]System.Console::WriteLine(string)
250 IL_0010: br.s IL_0012
254 } // end of method I5::I1.Func
257 .class interface private abstract auto ansi I6
260 .method private hidebysig newslot virtual final
261 instance int32 I1.Func(int32 a) cil managed
264 // Code size 20 (0x14)
266 .locals init (int32 V_0)
268 IL_0001: ldstr "At I6.Func"
269 IL_0006: call void [mscorlib]System.Console::WriteLine(string)
275 IL_0010: br.s IL_0012
279 } // end of method I6::I1.Func
282 .class interface private abstract auto ansi I7
287 .method private hidebysig newslot virtual final
288 instance int32 I1.Func(int32 a) cil managed
291 // Code size 20 (0x14)
293 .locals init (int32 V_0)
295 IL_0001: ldstr "At I7.Func"
296 IL_0006: call void [mscorlib]System.Console::WriteLine(string)
302 IL_0010: br.s IL_0012
306 } // end of method I7::I1.Func
309 .class interface private abstract auto ansi I8
318 .method private hidebysig newslot virtual final
319 instance int32 I1.Func(int32 a) cil managed
322 // Code size 20 (0x14)
324 .locals init (int32 V_0)
326 IL_0001: ldstr "At I8.Func"
327 IL_0006: call void [mscorlib]System.Console::WriteLine(string)
333 IL_0010: br.s IL_0012
337 } // end of method I8::I1.Func
340 .class private auto ansi beforefieldinit I47Class
341 extends [mscorlib]System.Object
350 .method public hidebysig specialname rtspecialname
351 instance void .ctor() cil managed
356 IL_0001: call instance void [mscorlib]System.Object::.ctor()
359 } // end of method I47Class::.ctor
361 } // end of class I47Class
363 .class private auto ansi beforefieldinit I8Class
364 extends [mscorlib]System.Object
374 .method public hidebysig specialname rtspecialname
375 instance void .ctor() cil managed
380 IL_0001: call instance void [mscorlib]System.Object::.ctor()
383 } // end of method I8Class::.ctor
385 } // end of class I8Class
387 .class interface private abstract auto ansi GI1`1<T>
389 .method public hidebysig newslot abstract virtual
390 instance int32 Func<S>([out] class [mscorlib]System.Type[]& types) cil managed
392 } // end of method GI1`1::'GI1<T>.Func'
394 } // end of class GI1`1
396 .class interface private abstract auto ansi GI2`1<T>
397 implements class GI1`1<!T>
399 .method private hidebysig newslot virtual final
400 instance int32 'GI1<T>.Func'<S>([out] class [mscorlib]System.Type[]& types) cil managed
402 .override method instance int32 class GI1`1<!T>::Func<[1]>(class [mscorlib]System.Type[]&)
403 // Code size 100 (0x64)
405 .locals init (int32 V_0)
408 IL_0002: newarr [mscorlib]System.Object
412 IL_000e: call class [mscorlib]System.Type [mscorlib]System.Type::GetTypeFromHandle(valuetype [mscorlib]System.RuntimeTypeHandle)
421 IL_0023: call class [mscorlib]System.Type [mscorlib]System.Type::GetTypeFromHandle(valuetype [mscorlib]System.RuntimeTypeHandle)
425 IL_002b: ldstr ", GI2"
427 IL_0031: call string [mscorlib]System.String::Concat(object[])
428 IL_0036: call void [mscorlib]System.Console::WriteLine(string)
432 IL_003e: newarr [mscorlib]System.Type
436 IL_004a: call class [mscorlib]System.Type [mscorlib]System.Type::GetTypeFromHandle(valuetype [mscorlib]System.RuntimeTypeHandle)
441 IL_0057: call class [mscorlib]System.Type [mscorlib]System.Type::GetTypeFromHandle(valuetype [mscorlib]System.RuntimeTypeHandle)
446 IL_0060: br.s IL_0062
450 } // end of method G2`1::'GI1<T>.Func'
451 } // end of class GI2`1
453 .class interface private abstract auto ansi GI3`1<T>
454 implements class GI1`1<!T>
456 .method private hidebysig newslot virtual final
457 instance int32 'GI1<T>.Func'<S>([out] class [mscorlib]System.Type[]& types) cil managed
459 .override method instance int32 class GI1`1<!T>::Func<[1]>(class [mscorlib]System.Type[]&)
460 // Code size 100 (0x64)
462 .locals init (int32 V_0)
465 IL_0002: newarr [mscorlib]System.Object
469 IL_000e: call class [mscorlib]System.Type [mscorlib]System.Type::GetTypeFromHandle(valuetype [mscorlib]System.RuntimeTypeHandle)
478 IL_0023: call class [mscorlib]System.Type [mscorlib]System.Type::GetTypeFromHandle(valuetype [mscorlib]System.RuntimeTypeHandle)
482 IL_002b: ldstr ", GI3"
484 IL_0031: call string [mscorlib]System.String::Concat(object[])
485 IL_0036: call void [mscorlib]System.Console::WriteLine(string)
489 IL_003e: newarr [mscorlib]System.Type
493 IL_004a: call class [mscorlib]System.Type [mscorlib]System.Type::GetTypeFromHandle(valuetype [mscorlib]System.RuntimeTypeHandle)
498 IL_0057: call class [mscorlib]System.Type [mscorlib]System.Type::GetTypeFromHandle(valuetype [mscorlib]System.RuntimeTypeHandle)
503 IL_0060: br.s IL_0062
507 } // end of method GI3`1::'GI1<T>.Func'
508 } // end of class GI3`1
510 .class interface private abstract auto ansi GI4`1<T>
511 implements class GI2`1<!T>,
515 .method private hidebysig newslot virtual final
516 instance int32 'GI1<T>.Func'<S>([out] class [mscorlib]System.Type[]& types) cil managed
518 .override method instance int32 class GI1`1<!T>::Func<[1]>(class [mscorlib]System.Type[]&)
519 // Code size 100 (0x64)
521 .locals init (int32 V_0)
524 IL_0002: newarr [mscorlib]System.Object
528 IL_000e: call class [mscorlib]System.Type [mscorlib]System.Type::GetTypeFromHandle(valuetype [mscorlib]System.RuntimeTypeHandle)
537 IL_0023: call class [mscorlib]System.Type [mscorlib]System.Type::GetTypeFromHandle(valuetype [mscorlib]System.RuntimeTypeHandle)
541 IL_002b: ldstr ", GI4"
543 IL_0031: call string [mscorlib]System.String::Concat(object[])
544 IL_0036: call void [mscorlib]System.Console::WriteLine(string)
548 IL_003e: newarr [mscorlib]System.Type
552 IL_004a: call class [mscorlib]System.Type [mscorlib]System.Type::GetTypeFromHandle(valuetype [mscorlib]System.RuntimeTypeHandle)
557 IL_0057: call class [mscorlib]System.Type [mscorlib]System.Type::GetTypeFromHandle(valuetype [mscorlib]System.RuntimeTypeHandle)
562 IL_0060: br.s IL_0062
566 } // end of method GI4`1::'GI1<T>.Func'
567 } // end of class GI4`1
569 .class private auto ansi beforefieldinit GI23Class`1<T>
570 extends [mscorlib]System.Object
571 implements class GI2`1<!T>,
575 .method public hidebysig specialname rtspecialname
576 instance void .ctor() cil managed
581 IL_0001: call instance void [mscorlib]System.Object::.ctor()
584 } // end of method GI23Class`1::.ctor
586 } // end of class GI23Class`1
588 .class private auto ansi beforefieldinit GI4Class`1<T>
589 extends [mscorlib]System.Object
590 implements class GI4`1<!T>,
595 .method public hidebysig specialname rtspecialname
596 instance void .ctor() cil managed
601 IL_0001: call instance void [mscorlib]System.Object::.ctor()
604 } // end of method GI4Class`1::.ctor
606 } // end of class GI4Class`1
608 .class private auto ansi beforefieldinit Program
609 extends [mscorlib]System.Object
611 .method public hidebysig static void Negative() cil managed
613 // Code size 225 (0xe1)
615 .locals init (class FooClass V_0,
619 class GI23Class`1<object> V_4,
620 class GI1`1<object> V_5,
621 class [mscorlib]System.Exception V_6,
622 class [mscorlib]System.Exception V_7,
623 class [mscorlib]System.Type[] V_8,
624 class [mscorlib]System.Exception V_9)
626 IL_0001: newobj instance void FooClass::.ctor()
630 IL_0009: ldstr "Calling IFoo.Foo on Foo - expecting exception."
631 IL_000e: call void [mscorlib]System.Console::WriteLine(string)
638 IL_0018: callvirt instance int32 IFoo::Foo(int32)
641 IL_001f: ldstr "Expecting exception on Foo"
642 IL_0024: call void Test::Assert(bool,
646 IL_002b: leave.s IL_004a
649 catch [mscorlib]System.Exception
653 IL_0030: ldstr "Exception caught: "
655 IL_0037: callvirt instance string [mscorlib]System.Object::ToString()
656 IL_003c: call string [mscorlib]System.String::Concat(string,
658 IL_0041: call void [mscorlib]System.Console::WriteLine(string)
661 IL_0048: leave.s IL_004a
664 IL_004a: newobj instance void I47Class::.ctor()
668 IL_0052: ldstr "Calling I1.Func on I47Class - expecting exception"
669 IL_0057: call void [mscorlib]System.Console::WriteLine(string)
676 IL_0061: callvirt instance int32 I1::Func(int32)
679 IL_0068: ldstr "Expecting exception on I47Class"
680 IL_006d: call void Test::Assert(bool,
684 IL_0074: leave.s IL_0093
687 catch [mscorlib]System.Exception
691 IL_0079: ldstr "Exception caught: "
693 IL_0080: callvirt instance string [mscorlib]System.Object::ToString()
694 IL_0085: call string [mscorlib]System.String::Concat(string,
696 IL_008a: call void [mscorlib]System.Console::WriteLine(string)
699 IL_0091: leave.s IL_0093
702 IL_0093: newobj instance void class GI23Class`1<object>::.ctor()
706 IL_009e: ldstr "Calling GI1<T>.Func on GI23Class<S> - expecting ex"
708 IL_00a3: call void [mscorlib]System.Console::WriteLine(string)
714 IL_00ac: ldloca.s V_8
715 IL_00ae: callvirt instance int32 class GI1`1<object>::Func<string>(class [mscorlib]System.Type[]&)
718 IL_00b5: ldstr "Expecting exception on GI23Class"
719 IL_00ba: call void Test::Assert(bool,
723 IL_00c1: leave.s IL_00e0
726 catch [mscorlib]System.Exception
730 IL_00c6: ldstr "Exception caught: "
732 IL_00cd: callvirt instance string [mscorlib]System.Object::ToString()
733 IL_00d2: call string [mscorlib]System.String::Concat(string,
735 IL_00d7: call void [mscorlib]System.Console::WriteLine(string)
738 IL_00de: leave.s IL_00e0
742 } // end of method Program::Negative
744 .method public hidebysig static void Positive() cil managed
746 // Code size 189 (0xbd)
748 .locals init (class I4Class V_0,
751 class GI4Class`1<object> V_3,
752 class [mscorlib]System.Type[] V_4,
753 class GI1`1<object> V_5)
755 IL_0001: ldstr "Calling I1.Func on I4Class - expecting I4.Func"
756 IL_0006: call void [mscorlib]System.Console::WriteLine(string)
758 IL_000c: newobj instance void I4Class::.ctor()
764 IL_0017: callvirt instance int32 I1::Func(int32)
767 IL_0020: ldstr "Expecting I1.Func to land on I4.Func"
768 IL_0025: call void Test::Assert(bool,
771 IL_002b: ldstr "Calling I1.Func on I8Class - expecting I8.Func"
772 IL_0030: call void [mscorlib]System.Console::WriteLine(string)
774 IL_0036: newobj instance void I8Class::.ctor()
780 IL_0041: callvirt instance int32 I1::Func(int32)
783 IL_004a: ldstr "Expecting I1.Func to land on I8.Func"
784 IL_004f: call void Test::Assert(bool,
787 IL_0055: ldstr "Calling GI1.Func on GI4Class<object> - expecting G"
789 IL_005a: call void [mscorlib]System.Console::WriteLine(string)
791 IL_0060: newobj instance void class GI4Class`1<object>::.ctor()
796 IL_006b: ldloca.s V_4
797 IL_006d: callvirt instance int32 class GI1`1<object>::Func<string>(class [mscorlib]System.Type[]&)
800 IL_0075: ldstr "Expecting GI1<T>.Func to land on GII4<T>.Func<S>"
801 IL_007a: call void Test::Assert(bool,
807 IL_0084: ldtoken [mscorlib]System.Object
808 IL_0089: call class [mscorlib]System.Type [mscorlib]System.Type::GetTypeFromHandle(valuetype [mscorlib]System.RuntimeTypeHandle)
809 IL_008e: call bool [mscorlib]System.Type::op_Equality(class [mscorlib]System.Type,
810 class [mscorlib]System.Type)
811 IL_0093: ldstr "T must be object"
812 IL_0098: call void Test::Assert(bool,
818 IL_00a2: ldtoken [mscorlib]System.String
819 IL_00a7: call class [mscorlib]System.Type [mscorlib]System.Type::GetTypeFromHandle(valuetype [mscorlib]System.RuntimeTypeHandle)
820 IL_00ac: call bool [mscorlib]System.Type::op_Equality(class [mscorlib]System.Type,
821 class [mscorlib]System.Type)
822 IL_00b1: ldstr "S must be string"
823 IL_00b6: call void Test::Assert(bool,
827 } // end of method Program::Positive
829 .method public hidebysig static int32 Main() cil managed
832 // Code size 23 (0x17)
834 .locals init (int32 V_0)
836 IL_0001: call void Program::Negative()
838 IL_0007: call void Program::Positive()
840 IL_000d: call int32 Test::Ret()
842 IL_0013: br.s IL_0015
846 } // end of method Program::Main
848 .method public hidebysig specialname rtspecialname
849 instance void .ctor() cil managed
854 IL_0001: call instance void [mscorlib]System.Object::.ctor()
857 } // end of method Program::.ctor
859 } // end of class Program
861 .class private auto ansi beforefieldinit Test
862 extends [mscorlib]System.Object
864 .field private static bool Pass
865 .method public hidebysig static int32 Ret() cil managed
867 // Code size 19 (0x13)
869 .locals init (int32 V_0)
871 IL_0001: ldsfld bool Test::Pass
872 IL_0006: brtrue.s IL_000c
874 IL_0008: ldc.i4.s 101
875 IL_000a: br.s IL_000e
879 IL_000f: br.s IL_0011
883 } // end of method Test::Ret
885 .method public hidebysig static void Assert(bool cond,
886 string msg) cil managed
888 // Code size 47 (0x2f)
890 .locals init (bool V_0)
895 IL_0004: brfalse.s IL_0015
898 IL_0007: ldstr "PASS"
899 IL_000c: call void [mscorlib]System.Console::WriteLine(string)
902 IL_0013: br.s IL_002e
905 IL_0016: ldstr "FAIL: "
907 IL_001c: call string [mscorlib]System.String::Concat(string,
909 IL_0021: call void [mscorlib]System.Console::WriteLine(string)
912 IL_0028: stsfld bool Test::Pass
915 } // end of method Test::Assert
917 .method public hidebysig specialname rtspecialname
918 instance void .ctor() cil managed
923 IL_0001: call instance void [mscorlib]System.Object::.ctor()
926 } // end of method Test::.ctor
928 .method private hidebysig specialname rtspecialname static
929 void .cctor() cil managed
934 IL_0001: stsfld bool Test::Pass
936 } // end of method Test::.cctor
938 } // end of class Test
941 // =============================================================
943 // *********** DISASSEMBLY COMPLETE ***********************
944 // WARNING: Created Win32 resource file diamondshape.res