O'Reilly logo

.NET Common Language Runtime Unleashed by Kevin Burton

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Commonly Used IL Instructions

Most likely, you will see instructions with ILDasm, but you might instead want to build your own IL code.

Note

The counterpart to ILDasm is ILasm. ILasm takes in IL code instructions and generates an assembly. It is possible to take the output of ILDasm and feed it into ILasm.

These instructions can be grouped into loading, storing, branching or flow control, operations, and object model. They are covered in detail in the following subsections.

IL Instructions for Loading

Following is a list of instructions that are used for loading values onto the evaluation stack.

  • ldc— This loads a numeric constant onto the stack. You will see this instruction whenever you have a hard-coded constant that you need to operate on ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required