Search code examples
cil

CIL stack exchange instruction


Is there a CIL instruction to exchange the first two elements in the stack?


Solution

  • There is no single instruction exchange. However, using stloc, pop, and ldloc, you should be able to accomplish your exchange.