CTS Common Type System| Components of Dot Net framework

Most Important Component of the Dot net frame work is CTS (Common Type System). In Language specification specifies the syntactical rules. where as Cts verifies the data type.

Common Type System

In Manged code execution Dot net supports the 61 Programming languages among all these programming languages has its own data type system.
Every programming language has its own data type system, one programming language can not understand the other programming language data types system.But all the programming language data types are commonly executed by CLR. This is because of the CLR does not conatin any programming language data type or can't understand the ant other programming language data types rather CLR has its own data type system.
At the time of compilation all programming languages data types are converted CLR's data type language compiler. So CLR understand its data types.
Data type system of CLR is common to the programming languages supported by .net . This system is known as "Common Type System".
Commont Type System of CLR is Divided in to two categories. 1)Value Types, 2) Reference type.

Value Type :

The data types which are capable of storing the data directly into their memory locations are known as "Value Types". Ex: int a=10;

Reference Type:

The data types which can't store the data directly into their memory location rather reffers to other memory location were data is stored, are known as "Reference Types". Ex: String s="LAKS".

Difference Between Value types and Reference Types


Value Types Reference Type
Store the data directly into their memory location Stores the directly into their memoray locations rather refers to other memory locations where data is stored
Memory is alloted at compile time Memory is alloted at run time
memory allocation is made with in the stack Memory allocation is made with the heap
CLR  not provide the "Automatic memory management" CLR does not provide the "Automatic memory management"

Boxing and Un Boxing

Boxing :

Boxing is the process of converting a variable from "value type to reference type".

Un Boxing :

un boxing is the process of converting a variable from "reference type to value type".

Post a Comment