#956 – The Common Language Infrastructure (CLI)

The Common Language Infrastructure (CLI) is a definition for the environment in which managed applications run.

The CLI is both language- and platform-neutral:

  • You can write a CLI-compliant application in a number of different languages
    • E.g. C#, Visual Basic .NET, F#
  • You can execute a CLI-compliant applicaton on any platform where an implementation of the CLI is running
    • E.g. Windows (Common Language Runtime), OS X (Mono)

Microsoft’s Common Language Runtime (CLR) is an implementation of the CLI that runs on Windows. ┬áMono is an implementation of the CLI that runs on several platforms, including Android, Linux and OS X.

The CLI includes:

  • Common Type System (CTS) – defines of a set of types and rules associated with those types
  • Common Language Specification (CLS) – defines a subset of the CTS that allows modules written in different languages to interoperate
  • Virtual Execution System (VES) – a runtime environment that enforces the CTS