.class public auto ansi beforefieldinit CLRviaCSharp_7
extends object
{
// Fields
.field private static literal string cValue = "const"
.field private initonly string rValue
// Methods
.method public hidebysig specialname rtspecialname
instance void .ctor () cil managed
{
// Method begins at RVA 0x20c7
// Code size 21 (0x15)
.maxstack 8
IL_0000: ldarg.0
IL_0001: call instance void object::.ctor()
IL_0006: nop
IL_0007: nop
IL_0008: ldarg.0
IL_0009: ldstr "readonly"
IL_000e: stfld string class Test7.CLRviaCSharp_7::rValue
IL_0013: nop
IL_0014: ret
} // End of method CLRviaCSharp_7..ctor
.method private static hidebysig
void Main (
string[] args
) cil managed
{
// Method begins at RVA 0x20e0
// Code size 48 (0x30)
.maxstack 2
.entrypoint
.locals init (
[0] class Test7.CLRviaCSharp_7 test7
)
IL_0000: nop
IL_0001: newobj instance void Test7.CLRviaCSharp_7::.ctor()
IL_0006: stloc.0
IL_0007: ldstr "cValue=const"
IL_000c: call void [mscorlib]System.Console::WriteLine(string)
IL_0011: nop
IL_0012: ldstr "rValue="
IL_0017: ldloc.0
IL_0018: ldfld string class Test7.CLRviaCSharp_7::rValue
IL_001d: call string string::Concat(string, string)
IL_0022: call void [mscorlib]System.Console::WriteLine(string)
IL_0027: nop
IL_0028: ldc.i4.1
IL_0029: call valuetype [mscorlib]System.ConsoleKeyInfo [mscorlib]System.Console::ReadKey(bool)
IL_002e: pop
IL_002f: ret
} // End of method CLRviaCSharp_7.Main
} // End of class Test7.CLRviaCSharp_7
网友评论