Common Intermediate Language

Common Intermediate Language (CIL) is a low-level programming language defined by the Common Language Infrastructure (CLI) specification and is used in both the .NET Framework and Mono. This Wikibook is meant to be both an introduction to CIL and a useful reference.

Contents

edit
Getting Started  
Writing and compiling a simple "Hello, World!" program.

Basics

edit
Basic Syntax  
The basic syntax of CIL.
Variables  
Creating and using variables.
Methods  
Declaring and calling methods.
Exception Handling  
Catching and throwing errors.

Instructions

edit
Stack  
Arithmetic  
Control Flow  
Logic  

Classes and Objects

edit
Classes  
Visibility Modifiers  
Enumerations  
Interfaces  
Value Types  
Attributes  
Namespaces  
Inheritance  
More Modifiers  
Generics  
Garbage Collection and Object Lifetimes  

Advanced Topics

edit
Code Generation  
Marshalling and Unmanaged Code