Skip to content

Instantly share code, notes, and snippets.

@MartinZikmund
Created December 8, 2019 21:26
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save MartinZikmund/407bdf00cb610ccea80a1a21b1fd9c19 to your computer and use it in GitHub Desktop.
Save MartinZikmund/407bdf00cb610ccea80a1a21b1fd9c19 to your computer and use it in GitHub Desktop.
ldloc.1 //loads the local variable at index 1 (which is the list instance) onto stack
ldc.i4.0 //loads the value of 0 onto stack
//calls the get_Item method on the list and pushes the return values onto the stack
callvirt instance !0 class [System.Collections]System.Collections.Generic.List`1<valuetype Riddle.ValueHolder>::get_Item(int32)
stloc.2 //pops the value off the stack and stores it as a local variable at index 2
ldloca.s 2 //loads the address of local variable at index 2
ldc.i4.5 //pushes the value 5 onto stack
call instance void Riddle.ValueHolder::SetValue(int32) //calls the SetValue method on the ValueHolder instance
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment