Created
July 27, 2015 23:54
-
-
Save marcioalthmann/b6d5d004f4fdbd627021 to your computer and use it in GitHub Desktop.
IL string interpolation
This file contains hidden or 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
.namespace csharpfeatures | |
{ | |
.class private auto ansi beforefieldinit MainClass | |
extends [mscorlib]System.Object | |
{ | |
// method line 1 | |
.method public hidebysig specialname rtspecialname | |
instance default void '.ctor' () cil managed | |
{ | |
// Method begins at RVA 0x2050 | |
// Code size 7 (0x7) | |
.maxstack 8 | |
IL_0000: ldarg.0 | |
IL_0001: call instance void object::'.ctor'() | |
IL_0006: ret | |
} // end of method MainClass::.ctor | |
// method line 2 | |
.method public static hidebysig | |
default void Main (string[] args) cil managed | |
{ | |
// Method begins at RVA 0x2058 | |
.entrypoint | |
// Code size 47 (0x2f) | |
.maxstack 3 | |
.locals init ( | |
string V_0, | |
int32 V_1, | |
string V_2, | |
string V_3) | |
IL_0000: nop | |
IL_0001: ldstr bytearray ( | |
4d 00 e1 00 72 00 63 00 69 00 6f 00 01 ) // M...r.c.i.o.. | |
IL_0006: stloc.0 | |
IL_0007: ldc.i4.s 0x1f | |
IL_0009: stloc.1 | |
IL_000a: ldstr "Nome: {0}, Idade: {1}" | |
IL_000f: ldloc.0 | |
IL_0010: ldloc.1 | |
IL_0011: box [mscorlib]System.Int32 | |
IL_0016: call string string::Format(string, object, object) | |
IL_001b: stloc.2 | |
IL_001c: ldstr "Nome: {0}, Idade: {1}" | |
IL_0021: ldloc.0 | |
IL_0022: ldloc.1 | |
IL_0023: box [mscorlib]System.Int32 | |
IL_0028: call string string::Format(string, object, object) | |
IL_002d: stloc.3 | |
IL_002e: ret | |
} // end of method MainClass::Main | |
} // end of class csharpfeatures.MainClass | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment