Tuesday 10 January 2012

Common Language Specification (CLS)


CLS (Common Language Specification):

CLS stands for “COMMON LANGUAGE SPECIFICATION”. CLS is a subset of COMMON TYPE SYSTEM. It is like an accord among language designer and class library designer to use a common set of basic language feature which all .NET language are expected to support.

The idea behind using CLS-compliant type in our programs is to give capability so that programs can interoperate with any .NET program written in any language like(c#, VB, F# etc). Example- a class written in C# can inherit from a class written in VB.

So we can say that using this specification (CLSCompliant attribute) in your programs (written in any language), the type is forced to conform to the rules of CLS and programs can interoperate with one another, taking full advantage of polymorphism, inheritance and other features.

No comments:

Post a Comment