CTS - Common Type System as name suggest it define types. How types are defined, declared , used and managed by common Language Runtime.? The main part is it supports cross language type integration. Confused ? Let me give you a simple example.
In C# i will define my Integer variable as int and in VB.Net i will say Integer. So when i will try to see the IL code in ILDASM tool .net treats both variable as Int32. The way of writing an integer may be different in different languages in .Net but Machine instructions are same and this is possible just because of Common Type System.
So that was the basic definition and understanding of CTS. Lets look over the types supported by CTS in .Net -
Type Definitions supported by CTS in .Net -
Hope you enjoyed reading the article.
In C# i will define my Integer variable as int and in VB.Net i will say Integer. So when i will try to see the IL code in ILDASM tool .net treats both variable as Int32. The way of writing an integer may be different in different languages in .Net but Machine instructions are same and this is possible just because of Common Type System.
So that was the basic definition and understanding of CTS. Lets look over the types supported by CTS in .Net -
- Class
- Structure
- Delegates
- Interface
- Enumerations
Type Definitions supported by CTS in .Net -
- Access Modifiers( Type accessibility ) - Public, Private, protected, Internal, Protected Internal
- Attributes - We can define our custom attributes and provide additional details
- Base Types - You can derive your class with Base class, not more than one
- Interfaces - You can implement multiple inheritance using Interface
- Fields
- Properties
- Indexes
- Methods
- Events
- Constructors
Hope you enjoyed reading the article.
0 comments:
Post a Comment