Contents tagged with Introduction to MSIL
-
Introduction to MSIL – Part 8 – The for each Statement
The for each statement; popularized by Visual Basic, humbly accepted by C++, and forever immortalized by a creation lovingly known as ECMA-334 (OK so some people simply call it C#).
-
Introduction to MSIL – Part 7 – Casts and Conversions
After a brief hiatus, I decided to post a few more parts of the Introduction to MSIL series.
-
Introduction to MSIL – Part 6 – Common Language Constructs
In parts 1 through 5 of the Introduction to MSIL series we focused on MSIL and the constructs it provides for writing managed code. In the next few sections we are going to examine some common language features that are not intrinsic to instruction-based languages like MSIL. Understanding the intermediate language instructions that are generated for common, programming language statements is critical to acquiring an instinct for the performance characteristics of your code as well as to more easily track down subtle bugs.
-
Introduction to MSIL – Part 5 – Exception Handling
In this part of the Introduction to MSIL series I will introduce the constructs that the CLI provides for exception handling.
-
Introduction to MSIL – Part 4 – Defining Type Members
In Part 3 of the MSIL series, I introduced the basic syntax for defining types. Using the .class directive, you can define reference types and value types. Choosing the type attributes correctly, you can exercise complete control over the definition of your type.
-
Introduction to MSIL – Part 3 – Defining Types
In this installment of the MSIL series, I describe how types are defined.
-
Introduction to MSIL – Part 2 – Using Local Variables
In part 2 of the Introduction to MSIL series, I will be exploring the use of local variables. Without variables, programs would not be very interesting. To illustrate the use of variables, let’s write a simple program to add numbers together.
-
Introduction to MSIL – Part 1 – Hello World
When describing C++/CLI and how it relates to C#, I am often tempted to discuss the Microsoft intermediate language (MSIL) that the Visual C++ and Visual C# compilers generate. The trouble is that most programmers are not familiar with MSIL and programs like ILDASM aren’t that helpful to the newbie because the MSIL they display, although painfully correct, is not very readable. For this reason I decided to post a few entries introducing MSIL at a basic level. Since I doubt anybody reading this will actually go and start writing code in MSIL, I will skim over some of the uninteresting details and focus on things like defining types, writing methods, calling instructions and handling exceptions.