Skip to content

Instantly share code, notes, and snippets.

@rpgmaker
Created July 31, 2012 15:25
Show Gist options
  • Save rpgmaker/3217797 to your computer and use it in GitHub Desktop.
Save rpgmaker/3217797 to your computer and use it in GitHub Desktop.
DoSomething2 IL
.method private hidebysig static void DoSomething2() cil managed
{
.maxstack 2
.locals init (
[0] int32 id)
L_0000: ldsfld class [mscorlib]System.Random TestILIdeas.Program::_rand
L_0005: callvirt instance int32 [mscorlib]System.Random::Next()
L_000a: stloc.0
L_000b: ldloc.0
L_000c: ldc.i4.1
L_000d: bgt.s L_0012
L_000f: ldloc.0
L_0010: brtrue.s L_0000
L_0012: ldloc.0
L_0013: ldc.i4.1
L_0014: ble.s L_0020
L_0016: ldloc.0
L_0017: ldc.i4.1
L_0018: add
L_0019: stloc.0
L_001a: ldloc.0
L_001b: call void [mscorlib]System.Console::Write(int32)
L_0020: ret
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment