Last active
December 7, 2018 02:40
-
-
Save baobao/1775be961afa71601c495c30140191ea to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// フィールド変数instanceVaribale定義 | |
.field private string instanceVaribale | |
// Mainメソッド定義 | |
.method public hidebysig | |
instance void Main () cil managed | |
{ | |
.maxstack 8 | |
// 自分自身の参照をスタックに乗せる | |
IL_0000: ldarg.0 | |
// instanceVaiableの値をスタックに乗せる | |
IL_0001: ldfld string Csharp::instanceVaribale | |
// Console.WriteLine実行 | |
IL_0006: call void [mscorlib]System.Console::WriteLine(string) | |
IL_000b: ret | |
} | |
// コンストラクタ | |
.method public hidebysig specialname rtspecialname | |
instance void .ctor () cil managed | |
{ | |
.maxstack 8 | |
// 自分自身の参照をスタックに乗せる | |
IL_0000: ldarg.0 | |
// "hoge"をスタックに乗せる | |
IL_0001: ldstr "hoge" | |
// string型のフィールドinstanceVaribaleの値が"hoge"に上書きされます | |
IL_0006: stfld string Csharp::instanceVaribale | |
// 自分自身の参照をスタックに乗せる | |
IL_000b: ldarg.0 | |
// 親クラスのコンストラクタを実行 | |
IL_000c: call instance void [mscorlib]System.Object::.ctor() | |
IL_0011: ret | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment