Common Type System
In Microsoft's .NET Framework, the Common Type System (CTS) is a standard that specifies how type definitions and specific values of types are represented in computer memory.[src] It is intended to allow programs written in different programming languages to easily share information.[src] As used in programming languages, a type can be described as a definition of a set of values (for example, "all integers between 0 and 10"), and the allowable operations on those values (for example, addition and subtraction).[src] The specification for the CTS is contained in Ecma standard 335, "Common Language Infrastructure (CLI) Partitions I to VI." The CLI and the CTS were created by Microsoft, and the Microsoft .NET framework is an implementation of the standard.[src]
In Microsoft's .NET Framework, the Common Type System (CTS) is a standard that specifies how type definitions and specific values of types are represented in computer memory.[src] It is intended to allow programs written in different programming languages to easily share information.[src] As used in programming languages, a type can be described as a definition of a set of values (for example, "all integers between 0 and 10"), and the allowable operations on those values (for example, addition and subtraction).[src] The specification for the CTS is contained in Ecma standard 335, "Common Language Infrastructure (CLI) Partitions I to VI." The CLI and the CTS were created by Microsoft, and the Microsoft .NET framework is an implementation of the standard.[src] ==Functions of the Common Type System== To establish a framework that helps enable cross-language integration, type safety, and high performance code execution.[src] To provide an object-oriented model that supports the complete implementation of many programming languages.[src] To define rules that languages must follow, which helps ensure that objects written in different languages can interact with each other.[src] The CTS also defines the rules that ensures that the data types of objects written in various languages are able to interact with each other.[src] The CTS also specifies the rules for type visibility and access to the members of a type, i.e.[src] the CTS establishes the rules by which assemblies form scope for a type, and the Common Language Runtime enforces the visibility rules.[src] The CTS defines the rules governing type inheritance, virtual methods and object lifetime.[src] Languages supported by .NET can implement all or some common data types… When rounding fractional values, the halfway-to-even ("banker's") method is used by default, throughout the Framework.[src] Since version 2, "Symmetric Arithmetic Rounding" (round halves away from zero) is also available by programmer's option.[src] it is used to communicate with other languages Imports System Class Class1 Public Value As Integer = 0 End Class 'Class1 Class Test Shared Sub Main() Dim val1 As Integer = 0 Dim val2 As Integer = val1 val2 = 123 Dim ref1 As New Class1() Dim ref2 As Class1 = ref1 ref2.Value = 123 Console.WriteLine("Values: {0}, {1}", val1, val2) Console.WriteLine("Refs: {0}, {1}", ref1.Value, ref2.Value) End Sub 'Main End Class 'Test The output of the above example Values: 0, 123 Refs: 123, 123 ===Boxing and unboxing=== ====Boxing==== Converting value types to reference types is also termed boxing.[src] As shown in the example below, it is not necessary to tell the compiler an Int32 is boxed to an object, because it takes care of this itself.[src] Int32 x = 10; object o = x ; // Implicit boxing Console.WriteLine("The Object o = {0}",o); // prints out "The Object o = 10" However, an Int32 can always be explicitly boxed like this: Int32 x = 10; object o = (object) x; // Explicit boxing Console.WriteLine("The object o = {0}",o); // prints out "The object o = 10" ====Unboxing==== The example below shows how to unbox a reference type back to a value type.[src] First an unboxed Int32 is boxed to an object, and then it is unboxed again.[src] Unboxing requires explicit type conversion (cast).[src] Int32 x = 5; object o1 = x; // Implicit boxing x = (int)o1; // Explicit unboxing ==See also== .NET Framework Blittable types Common Language Infrastructure ==References== ==External links== Microsoft developer's guide describing the CTS Built-in types in the .NET Framework[src]
23 sentences · 23 cited inline · 1 references stored
References
- MidpointRounding Enumeration · retrieved 2026-11-18 · rev 1370228723
Cite this reference
MLA "MidpointRounding Enumeration." 2026-11-18. https://docs.microsoft.com/en-us/dotnet/api/system.midpointrounding. Accessed 25 November 2026.
Chicago "MidpointRounding Enumeration." 2026-11-18. https://docs.microsoft.com/en-us/dotnet/api/system.midpointrounding.
APA encyclopegia.org. (2026). MidpointRounding Enumeration. Retrieved November 25, 2026, from https://docs.microsoft.com/en-us/dotnet/api/system.midpointrounding
Cite this article
MLA
"Common Type System." encyclopegia.org, 2026, https://encyclopegia.org/wiki/common-type-system. Accessed 25 November 2026.
Chicago
"Common Type System." encyclopegia.org. Accessed November 25, 2026. https://encyclopegia.org/wiki/common-type-system.
APA
encyclopegia.org. (2026). Common Type System. Retrieved November 25, 2026, from https://encyclopegia.org/wiki/common-type-system
Accessed November 25, 2026 · CC BY-SA 4.0 · citation page · JSON