Wednesday 25 June 2014

What is CLS and Explain its role?

CLS(Common Language Specification)

  • Language Specification: Every Programming Language will have some Syntactical rules used to write the code which is known as Language Specification.
  • As we know Managed code execution process .NET supports many programming languages.
  • Every programming Language has it own Language Specification.
  • One programming Language can not understood other Programming Language Specification.
  • But CLR will execute all programming Languages code, this because
    • CLR can not understand any programming Language Language Specification rather CLR has its own Language Specification (Syntactical Rules) for its MSIL.
    • Any Language Compiler should follow this Language Specification of CLR at the time of compilation and should generate MSIL, CLR's JIT Compiler will generate native code from MSIL and CLR will execute it.
  • This Language Specification of CLR is common to all programming Languages of Managed code execution of .NET and is known as CLS (Common Language Specification)
Role of CLS
  • CLS is responsible to provide language interoperability
  • This is achieved in 2 ways 
    1. Managed Code 
    2. Unmanaged Code.

No comments:

Post a Comment