CA1810_ Initialize reference type static fields inline
// Methods
.method public hidebysig specialname rtspecialname
instance void .ctor () cil managed
{
// Method begins at RVA 0x20e6
// Code size 7 (0x7)
.maxstack 8
IL_0000: ldarg.0
IL_0001: call instance void [mscorlib]System.Object::.ctor()
IL_0006: ret
} // end of method Class1::.ctor
.method private hidebysig specialname rtspecialname static
void .cctor () cil managed
{
// Method begins at RVA 0x20da
// Code size 11 (0xb)
.maxstack 8
IL_0000: call valuetype [mscorlib]System.DateTime [mscorlib]System.DateTime::get_Now()
IL_0005: stsfld valuetype [mscorlib]System.DateTime ConsoleApplication43.Class1::TimeStamp
IL_000a: ret
} // end of method Class1::.cctor
} // end of class ConsoleApplication43.Class1
.class private auto ansi ConsoleApplication43.Class2
extends [mscorlib]System.Object
{
// Fields
.field public static valuetype [mscorlib]System.DateTime TimeStamp
// Methods
.method private hidebysig specialname rtspecialname static
void .cctor () cil managed
{
// Method begins at RVA 0x20ee
// Code size 12 (0xc)
.maxstack 8
IL_0000: nop
IL_0001: call valuetype [mscorlib]System.DateTime [mscorlib]System.DateTime::get_Now()
IL_0006: stsfld valuetype [mscorlib]System.DateTime ConsoleApplication43.Class2::TimeStamp
IL_000b: ret
} // end of method Class2::.cctor
.method public hidebysig specialname rtspecialname
instance void .ctor () cil managed
{
// Method begins at RVA 0x20fb
// Code size 7 (0x7)
.maxstack 8
IL_0000: ldarg.0
IL_0001: call instance void [mscorlib]System.Object::.ctor()
IL_0006: ret
} // end of method Class2::.ctor
} // end of class ConsoleApplication43.Class2
.class private auto ansi beforefieldinit ConsoleApplication43.Program
extends [mscorlib]System.Object
{
// Methods
.method private hidebysig static
void Main (
string[] args
) cil managed
{
// Method begins at RVA 0x2050
// Code size 118 (0x76)
.maxstack 1
.entrypoint
.locals init (
[0] valuetype [mscorlib]System.DateTime CS$0$0000
)
IL_0000: nop
IL_0001: ldc.i4 1000
IL_0006: call void [mscorlib]System.Threading.Thread::Sleep(int32)
IL_000b: nop
IL_000c: call valuetype [mscorlib]System.DateTime [mscorlib]System.DateTime::get_Now()
IL_0011: stloc.0
IL_0012: ldloca.s CS$0$0000
IL_0014: constrained. [mscorlib]System.DateTime
IL_001a: callvirt instance string [mscorlib]System.Object::ToString()
IL_001f: call void [mscorlib]System.Console::WriteLine(string)
IL_0024: nop
IL_0025: ldsflda valuetype [mscorlib]System.DateTime ConsoleApplication43.Class1::TimeStamp
IL_002a: constrained. [mscorlib]System.DateTime
IL_0030: callvirt instance string [mscorlib]System.Object::ToString()
IL_0035: call void [mscorlib]System.Console::WriteLine(string)
IL_003a: nop
IL_003b: ldc.i4 1000
IL_0040: call void [mscorlib]System.Threading.Thread::Sleep(int32)
IL_0045: nop
IL_0046: call valuetype [mscorlib]System.DateTime [mscorlib]System.DateTime::get_Now()
IL_004b: stloc.0
IL_004c: ldloca.s CS$0$0000
IL_004e: constrained. [mscorlib]System.DateTime
IL_0054: callvirt instance string [mscorlib]System.Object::ToString()
IL_0059: call void [mscorlib]System.Console::WriteLine(string)
IL_005e: nop
IL_005f: ldsflda valuetype [mscorlib]System.DateTime ConsoleApplication43.Class2::TimeStamp
IL_0064: constrained. [mscorlib]System.DateTime
IL_006a: callvirt instance string [mscorlib]System.Object::ToString()
IL_006f: call void [mscorlib]System.Console::WriteLine(string)
IL_0074: nop
IL_0075: ret
} // end of method Program::Main
.method public hidebysig specialname rtspecialname
instance void .ctor () cil managed
{
// Method begins at RVA 0x20d2
// Code size 7 (0x7)
.maxstack 8
IL_0000: ldarg.0
IL_0001: call instance void [mscorlib]System.Object::.ctor()
IL_0006: ret
} // end of method Program::.ctor
} // end of class ConsoleApplication43.Program
}