written in c# should same to class in vb.net etc. So to make language integration , Microsoft
specifies CTS.
CTS specify how type’s classes are reference and how applications and class libraries are
packaged for execution on CLR. It defines class declaration, inheritance, referencing and
type management as .NET Framework.
CTS supply the following ground works for the .NET framework:
● CTS provide the first class, pure object oriented model supported by all
programming languages.
● CTS establish the foundation and reference framework for cross language
integration, interoperation, type safety, security and high performance code
execution.
● CTS defines rule that languages must follow, which ensures that objects written in
different languages can interact with each other.
Microsoft .NET support rich set of types but the important types are value type,
reference type, classes, interfaces and delegates.
Value types: It represents the value allocated on stack. They can not be null must contain some
value. Values are passed by value to the function it means that original value would not
change. Value types includes primitives, structure and enumeration.
Reference Type: It includes object, interfaces and pointer. It contains reference to the object and
it can be null.
Classes: CLR provides full support of OO concepts and class features such as methods, fields,
static members, visibility , nested type etc.
Interfaces: It is exactly the same concept as C++ abstract base classes. An interface may contain
method , properties, events ,indexer. In .NET a class can derived from multiple interfaces.
Delegates: Microsoft .NET support type safe version of function pointer called delegates.
Common Language Specification (CLS)
.NET is generally call “many language for one platform”. We can construct classes and
components that can be used by any language and its respective IDEs and development
tools, without the need for complex COM and ActiveX interfaces and registration details.
To achieve this, CLS requires that classes and component providers should expose only
the features that are common to all .NET languages.
CLS is a subset of CTS (Common Type System). Main goal of .NET is that program written
in any language should interoperate with one another taking advantage of inheritance,
polymorphism etc. However languages are not equal, they all have their own features but
Microsoft publish CLS to put all language on same sheet. CLS specifies series of rules that
are require for language integration and interoperation. Due to this classes of one language
can inherit in other language, objects of one language can pass to other language. So that
maximum code can be reuse. There are so many software development features such as
general, naming, types, types members, method, properties, event, pointers, arrays,