This is a discussion on Anybody explain about "Common Type System" (CTS)? within the ASP and ASP.NET Programming forums, part of the Web Development category; What is "Common Type System" (CTS)?...
| |||||||
| Register | FAQ | Members List | Calendar | Mark Forums Read |
| |||
| CTS defines all of the basic types that can be used in the .NET Framework and the operations performed on those type. All this time we have been talking about language interoperability, and .NET Class Framework. None of this is possible without all the language sharing the same data types. What this means is that an int should mean the same in VB, VC++, C# and all other .NET compliant languages. This is achieved through introduction of Common Type System (CTS). |
| |||
| In order that two language communicate smoothly CLR has CTS (Common Type System).Example in VB you have “Integer” and in C++ you have “long” these datatypes are not compatible so the interfacing between them is very complicated. In order to able that two different languages can communicate Microsoft introduced Common Type System. So “Integer” datatype in VB6 and “int” datatype in C++ will convert it to System.int32 which is datatype of CTS.
__________________ S.VinothkumaR Behind me is infinite power, Before me is Endless Possibility, Around me is Boundless Opportunity, Why should I fear! |
| |||
| hey guys, I have some ideas about CTS.In Common Type system there are few functions too. * Establishes a framework that helps enable cross-language integration, type safety, and high performance code execution. * Provides an object-oriented model that supports the complete implementation of many programming languages. * Defines rules that languages must follow, which helps ensure that objects written in different languages can interact with each other. Type categories The common type system supports two general categories of types: Value types Value types directly contain their data, and instances of value types are either allocated on the stack or allocated inline in a structure. Value types can be built-in (implemented by the runtime), user-defined, or enumerations. Reference types Reference types store a reference to the value's memory address, and are allocated on the heap. Reference types can be self-describing types, pointer types, or interface types. The type of a reference type can be determined from values of self-describing types. Self-describing types are further split into arrays and class types. The class types are user-defined classes, boxed value types, and delegates.
__________________ Venkat knowledge is Power |
| |||
| hey venkat, Your information is very usefull for me about the Types of common Type sysem. Can you give me the example for it.
__________________ H2O Without us, no one can survive.. |
| |||
| hi, The following example shows the difference between reference types and value types: Imports System Class Class1 Public Value As Integer = 0 End Class 'Class1 Class Test Shared Sub Main() Dim val1 As Integer = 0 Dim val2 As Integer = val1 val2 = 123 Dim ref1 As New Class1() Dim ref2 As Class1 = ref1 ref2.Value = 123 Console.WriteLine("Values: {0}, {1}", val1, val2) Console.WriteLine("Refs: {0}, {1}", ref1.Value, ref2.Value) End Sub 'Main End Class 'Test above said example will be helpful for you "H2o".
__________________ Venkat knowledge is Power |
![]() |
| Thread Tools | |
| Display Modes | |
| |
Similar Threads | ||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| What is the difference between "using System.Data;" and directly adding the refer | KiruthikaSambandam | ASP and ASP.NET Programming | 1 | 11-15-2007 01:33 AM |
| What is "Common Language Runtime" (CLR)? | H2o | ASP and ASP.NET Programming | 2 | 08-07-2007 03:42 AM |
| Explain "passing by value", "passing by pointer" and "passing by reference" | Sabari | C and C++ Programming | 1 | 07-30-2007 11:29 PM |
| What is the difference between "using System.Data;" and directly adding the reference | H2o | ASP and ASP.NET Programming | 1 | 07-24-2007 03:33 AM |
| Why do I get "HTTP 500" error(or "(DLL)initialization routine failed")in my browser? | kingmaker | ASP and ASP.NET Programming | 1 | 07-20-2007 04:38 AM |