COMMON TYPE SYSTEM [CTS]
- The Common type system (CTS) standardizes the data types of all programming language under .Net framework. OR
- The CTS is a standard for defining and using data types in the .Net framework.
- CTS define a collection of data types which are used and managed by the run-time to facilitate cross-language integration.
- CTS is a specification created by Microsoft's and included in the European computer manufacturer's association standard.
TYPES OF CTS
There are two types of CTS that every .Net programming language have :-
- Value types.
- Reference types.
Value types
- Value types directly store/contain the value [data] into the memory location.
- These types work with stack mechanism only.
- CLR allots memory for value type at compile time.
- They can be built-in standard (primitive types) user-defined (defined in source code) OR enumerations (represented by labels but stored as a numeric type).
- Variable that are value types each have their own copy of the data and therefore operations on one variable do not affect other variable.
Reference types
- Reference types contain/store a reference to the value's memory address.
- These types work with heap mechanism.
- CLR allots memory for reference types at run-time.
- Reference types can be self-describing types, pointer types OR interface types.
- Variables that are reference types can refer to the same object. Therefore, operation on one variable can affect the same object referred by another variable [No copy is made].
- All types derive from the system.object base type.
- CTS defines every datatype as a class.
COMMON LANGUAGE SPECIFICATION [CTS]
- CLS is a subset of CTS.
- CLS defines a set of rules and restrictions that every language must follow which runs under the .Net framework.
- Common language specification enables cross-language integration [inter-operability].
- CLS provides following features to the .Net framework :-
- Improved reliability.
- Increased performance.
- Powerful security.
- Integration with existing system.
- Mobility support.
- Ease of deployment
- Flexible data access.
MICROSOFT INTERMEDIATE LANGUAGE [MSIL]
- The MSIL is also known as Intermediate language [IL] OR Common Intermediate language [CIL].
- It is the lowest-level human readable programming language defined by Common language infrastructure [CLI] specification.
- CIL is an object-oriented assembly language and is entirely stack-based.
- MSIL OR CIL is a CPU and plate-form independent instruction set that can be executed in any environment supporting the common language run-time.
- The execution process is:-
- STEP 1 :- Source code is converted into MSIL.
- STEP 2 :- MSIL is then assembled into a form of byte-code.
- STEP 3 :- The CLR's just-in-time compiler converts the byte-code into native code.
- MSIL code is verified for safety during run-time provides better security an reliability.
- MSIL code has instructions for following group of tasks :-
- Load and store.
- Arithmetic.
- Type conversion.
- Object creation and manipulation.
- Control transfer.
- Method invocation and return.
- Throwing exceptions.
0 Comments