Chapter 2

The Common Language Runtime

What's in this chapter?

Framework Profiles and Platforms

Elements of a .NET Application

Understanding the Common Language Runtime

Memory Management

Namespaces

The My Keyword

Wrox.com Code Downloads for this Chapter

The wrox.com code downloads for this chapter are found at www.wrox.com/remtitle.cgi?isbn=9781118314456 on the Download Code tab. The code is in the chapter 2 download and individually named according to the code file names throughout the chapter.

You started with a quick jump straight into getting your hands on Visual Studio. Most developers want to feel something, but before you start diving into syntax this chapter is going to take a look at the bigger picture of how .NET runs in relation to the operating system (OS). While at really low levels for graphics some implementations of the common language runtime (CLR) and the OS may be indistinguishable, at its core the CLR provides the environment in which your application runs.

The architects of .NET realized that all procedural languages require certain base functionality. For example, many languages ship with their own runtime that provides features such as memory management, but what if, instead of each language shipping with its own runtime implementation, all languages used a common runtime? This would provide languages with a standard environment and access to all of the same features. This is exactly what the CLR provides.

The CLR manages the execution of code on the .NET ...

Get Professional Visual Basic 2012 and .NET 4.5 Programming now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.