Skip to content

Instantly share code, notes, and snippets.

@Et7f3
Created May 8, 2019 18:34
Show Gist options
  • Save Et7f3/bdbdb708628c65a16a69050b61c52d28 to your computer and use it in GitHub Desktop.
Save Et7f3/bdbdb708628c65a16a69050b61c52d28 to your computer and use it in GitHub Desktop.
main.c disassembled to shwo reaonly
.class private auto ansi beforefieldinit Program
extends [mscorlib]System.Object
{
.field public initonly string VarC
.field public static literal string VarD = "e"
// method line 1
.method public hidebysig specialname rtspecialname
instance default void '.ctor' () cil managed
{
// Method begins at RVA 0x2050
// Code size 18 (0x12)
.maxstack 8
IL_0000: ldarg.0
IL_0001: ldstr "e"
IL_0006: stfld string Program::VarC
IL_000b: ldarg.0
IL_000c: call instance void object::'.ctor'()
IL_0011: ret
} // end of method Program::.ctor
// method line 2
.method public hidebysig specialname
instance default string get_VarA () cil managed
{
// Method begins at RVA 0x2063
// Code size 6 (0x6)
.maxstack 8
IL_0000: ldstr "e"
IL_0005: ret
} // end of method Program::get_VarA
// method line 3
.method family hidebysig specialname
instance default string get_VarB () cil managed
{
// Method begins at RVA 0x206a
// Code size 6 (0x6)
.maxstack 8
IL_0000: ldstr "e"
IL_0005: ret
} // end of method Program::get_VarB
// method line 4
.method public static hidebysig
default void Main () cil managed
{
// Method begins at RVA 0x2071
.entrypoint
// Code size 1 (0x1)
.maxstack 8
IL_0000: ret
} // end of method Program::Main
.property instance string VarA ()
{
.get instance default string Program::get_VarA ()
}
.property instance string VarB ()
{
.get instance default string Program::get_VarB ()
}
} // end of class Program
internal class Program
{
public string VarA { get => "e";}
protected string VarB { get => "e";}
public readonly string VarC = "e";
public const string VarD = "e";
public static void Main()
{
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment