Intermediate Language: Digging Deeper
In this chapter, I’ll carry on where I left off at the end of Chapter 1. In Chapter 1 you learned many of the principles on which IL is based: IL assembly syntax, the concept of the evaluation stack, and how to code a simple procedural program in IL. However, I haven’t yet introduced object-oriented programming in IL. In the previous chapter, everything you did was essentially procedural. You did see how to define classes, but in the examples in Chapter 1, I was generally careful to use only static methods. This chapter will rectify that by discussing how to define and use types in IL, including defining instance fields, methods, properties, and constructors. I’ll also show you how to code some more advanced .NET constructs such as delegates—and the chapter will end by applying what you’ve learned and then examining and compare the IL emitted by the C#, VB, and C++ compilers.
KeywordsObject Reference Exception Handling Reference Type Intermediate Language Previous Code
Unable to display preview. Download preview PDF.