Skip to content

Instantly share code, notes, and snippets.

@nedgrady
Last active June 23, 2019 15:00
Show Gist options
  • Save nedgrady/09a798e82a5834eb65749157ca1e223d to your computer and use it in GitHub Desktop.
Save nedgrady/09a798e82a5834eb65749157ca1e223d to your computer and use it in GitHub Desktop.
System.Console.WriteLine(i + 10);
// Push the value of i back onto the stack.
IL_0007: ldloc.0 // i
// Push 10 (0xA) onto the stack
IL_0008: ldc.i4.s 0A
// Add the two top values, leaving the result on top of the stack
IL_000A: add
// Call the static System.Console.WriteLine method, notice we’re passing a
// parameter by pushing its value onto the stack before a call instruction.
IL_000B: call System.Console.WriteLine
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment