Pages

Friday, January 11, 2008

Common Type System

1. CTS provides base set of datatypes which is responsible for cross language integration.

2. Most languages use aliases to implement those types (Eg: C# implements int as alias for Int32).

3. CTS is categorized into two types called ValueTypes and ReferenceTypes.

4. Each object in the hierarchy has the common interface.

5. Ensures Type - Safe Code.

Type - Safe Code means given a valid object reference, type-safe code can access memory at fixed offsets corresponding to actual field members.

6. Defines rules that languages must follow, which helps ensure that objects written in different languages can interact with each other.

7. Set of Base Types is called CTS.

8. Multiple Inheritance is not allowed in .NET and this can be treated as one of the rules.

9. System.Object is a common base type where all other types are derived from.

10. CTS standardizes the conventions that all the languages must follow.

11. CTS is responsible for defining types that can be used across the .NET Languages.

12. Variables that are Value Type have their own copy of the data.

13. Value Types and Reference Types, all are derived from type called System.Object.

14. Common Language Specification is the subset of Common Type System. (Defines Language rules to be followed.)

15. CTS provides types that are available to be used by programs in .NET and CLS specifies how those type are to be used in a consistent manner to ensure compatibility with other languages.

No comments: