.class public EngineeringData extends [mscorlib]System.Object { .field private static initonly float64[] coefficient .method private specialname rtspecialname static void .cctor() cil managed { .maxstack 1 // allocate array of 4 Double ldc.i4.4 newarr [mscorlib]System.Double // point initonly field to new array stsfld float64[] EngineeringData::coefficient // code to initialize array elements goes here ret } }
.method assembly specialname rtspecialname static void .cctor() cil managed { .custom instance void [mscorlib]System.Diagnostics.DebuggerStepThroughAttribute::.ctor() = ( 01 00 00 00 ) // Code size 39 (0x27) .maxstack 2 .locals ([0] valuetype '<CrtImplementationDetails>'.LanguageSupport languageSupport) IL_0000: ldloca.s languageSupport IL_0002: call valuetype '<CrtImplementationDetails>'.LanguageSupport* modopt([mscorlib]System.Runtime.CompilerServices.CallConvThiscall) '<CrtImplementationDetails>.LanguageSupport.{ctor}'(valuetype '<CrtImplementationDetails>'.LanguageSupport* modopt([mscorlib]System.Runtime.CompilerServices.IsConst) modopt([mscorlib]System.Runtime.CompilerServices.IsConst)) IL_0007: pop .try { IL_0008: ldloca.s languageSupport IL_000a: call void modopt([mscorlib]System.Runtime.CompilerServices.CallConvThiscall) '<CrtImplementationDetails>.LanguageSupport.Initialize'(valuetype '<CrtImplementationDetails>'.LanguageSupport* modopt([mscorlib]System.Runtime.CompilerServices.IsConst) modopt([mscorlib]System.Runtime.CompilerServices.IsConst)) IL_000f: leave.s IL_001f } // end .try fault { IL_0011: ldftn void modopt([mscorlib]System.Runtime.CompilerServices.CallConvThiscall) '<CrtImplementationDetails>.LanguageSupport.{dtor}'(valuetype '<CrtImplementationDetails>'.LanguageSupport* modopt([mscorlib]System.Runtime.CompilerServices.IsConst) modopt([mscorlib]System.Runtime.CompilerServices.IsConst)) IL_0017: ldloca.s languageSupport IL_0019: call void ___CxxCallUnwindDtor(method void *(void*), void*) IL_001e: endfinally } // end handler IL_001f: ldloca.s languageSupport IL_0021: call void modopt([mscorlib]System.Runtime.CompilerServices.CallConvThiscall) 'gcroot<System::String ^>.{dtor}'(valuetype 'gcroot<System::String ^>'* modopt([mscorlib]System.Runtime.CompilerServices.IsConst) modopt([mscorlib]System.Runtime.CompilerServices.IsConst)) IL_0026: ret } // end of method 'Global Functions'::.cctor
Source: https://habr.com/ru/post/175185/
All Articles