Understanding Common Language Specification (CLS)

Common Language Specification is a set of specifications to interoperate objects written in all languages in .Net Framework. These specifications are documented in the ECMA proposed standard document, “Partition I Architecture”. When your application wants to interact with objects that are written in different languages, those objects must expose the features that are common to all the languages they must interoperate with. This is where the Common Language Specification ensures language interoperability by defining a set of features that are available in wide variety of languages.


The Common Language Specification rules are almost similar to that of Common Type System, except that the rules for Common Language Specification are stricter than that of Common Type System. Moreover, Common Type System is just a basic infrastructure to define, declare, use, and manage types for Common Language Runtime to follow. On the other hand, Common Language Specification is a set of rules to enable the types, written in different languages, to interoperate with each other.

You can create or design your own class library using Common Language Specification. Moreover, you can use class library to make sure that Application Programming Interface (APIs) are callable from a wide variety of programming languages. But before including the features to create a class library, using Common Language Specification, you should follow two principal things. First, whether the features to be included in the class library enable the type of Application Programming Interface development appropriate to the managed space and secondly whether it is difficult for the compiler to expose those features.

Components that follow the Common Language Specification rules and use the features included in the Common Language Specification are said to be CLS-compliant components. The Common Language Specification compliance feature helps you determine whether your managed code conforms to the Common Language Specification. If it does then to what extent a given tool supports the development of managed code that uses Common Language Specification features. Moreover, all the names within a CLS-compliant scope must not be similar to each other, except when the names are indistinguishable and resolved through overloading.


_______________________________________________________________________

Add to My Yahoo!


FREE Subscription

Subscribe to our mailing list and receive new articles
through email. Keep yourself updated with latest
developments in the industry.

Name:
Email:

Note : We never rent, trade, or sell my email lists to
anyone. We assure that your privacy is respected
and protected.

Visit .NET Programming Tutorial Homepage

______________________________________________________

Recommended Resource


| Privacy Policy for www.dotnet-guide.com | Disclosure | Contact |

Copyright - © 2004 - 2017 - All Rights Reserved.