C#
The Type SystemC# - The Type System
The Type System
At the center of the Microsoft .NET Framework is a universal type system called the .NET Common Type System (CTS). In addition to defining all types, the CTS also stipulates the rules that the Common Language Runtime (CLR) follows with regard to applications declaring and using these types. In this tutorial, we'll look at this new type system so that you can learn the types available to C# developers and understand the ramifications of using the different types in C# programs. We'll begin by exploring the concept that every programming element is an object in .NET. We'll then look at how .NET divides types into the two categories—value types and reference types—and we'll discover how boxing enables a completely object-oriented type system to function efficiently. Finally, we'll cover how type casting works in C#, and we'll start looking at namespaces.