In this chapter, we are going to carry on where we left off at the end of 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 fields, methods, properties, and constructors. I'll also show you how to code up some more advanced .NET constructs such as delegates - and we'll end the chapter by applying what we've learned to examine and compare the IL emitted by the C#, VB, and C++ compilers.
So in this chapter we will cover:
Instantiating objects of both value and reference types, invoking instance methods, and defining fields and properties
Enums
Arrays
Using P/Invoke
Exception handling
Delegates
Custom attributes
Comparison of the IL code generated by compilers in C#, VB, and C++