Chapter 5. Intermediate Language Basics

In This Chapter

As the saying goes, “All roads lead to Rome.” With the .NET Framework, all languages lead to Intermediate Language (IL). Specifically, for Microsoft platforms, it is MSIL. This chapter is about developing a sort of IL literacy so that you are able to at least read and understand basic IL instructions. You might be tempted to skip this chapter because you might feel like learning IL is like learning x86 assembly code. You program at a high level in C, C++, or VB, and you never have to worry about the assembly instructions that are generated. To a certain extent, you are right. It is certainly possible to go a long time programming in C# without having to know IL. However, knowing IL will be another tool in your tool chest that allows you to better understand the inner workings of your code and other third-party code.

ILDASM becomes a valuable debugging tool when you are relying on tools such as SoapSuds (see Chapter 13, “Building Distributed Applications with .NET Remoting”) or tlbimp (see Chapter 8, “Using COM/COM+ from Managed Code”), or if you just want to see a version of an assembly for use with deployment. This chapter tries to remove any fear that you might feel with IL. Although you might not be ready to do all of your development in IL after reading this chapter, you will at least feel comfortable looking at IL and knowing what is going on. Before explaining the basics about IL, this chapter offers a brief tutorial on ILDSAM, which will become the main gateway into IL code.

..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset
52.14.1.136