Today, we will discuss CTS which is the one of the most important component of .NET Framework. Since, .NET is language independent and supports more than 25+ languages, developers need to code according to the datatypes in their own programming language.
Common Type System(CTS):
Common Type System(CTS):
- Common Type System defines how types are declared, used and managed in Common Language Runtime and is also an important of the runtime's cross language integration.
- e.g an integer variable in c# is written as int, whereas in VB, it is written as Integer. In .NET framework, it is assigned to only single class that is System.Int32.
- It establishes a framework which performs cross language integration, type-safety and high performance code execution.
- Provides an object-oriented model that supports the complete integration of many programming languages.
- Defines protocols that languages must follow which helps us to ensure that objects written in different languages can interact with each other.
- CTS is classified as a single rooted hierarchy with System.Object as the base type from which all other types are derived.
- CTS supports two different kinds of types:
- Value Types: It contains a value that need to be stored directly on the stack or allocated in-line in structure.
- Reference Types: It is stored as a reference to the values memory address and allocated on heap.
No comments:
Post a Comment