by Dinesh Thakur Category: Dot Net

A component can be called by any .NET-based language regardless the original language of that component. The cross-language compatibility is possible because objects created in different .NET languages agree on a common set of types and features. These common types and features are spelled out in the Common Language Specification (CLS).

Let’s take a look how CLR provide cross language interaction:

1. Every .NET based language compiler translates source language program into MSIL code.

2. The CLR also defines, the format' of storing assembly metadata and this means all assemblies whatever language they were written in, share a common format for storing Metadata. '

3. All .NET based language follow Common Language Specification (CLS). CLS specifies a set of features that every .NET complaint language has to follow. A .NET complaint language may have its own unique features but it must follow the common set of features specified in CLS.

Because the target code of each .NET based compiler is represented in same language. The metadata is expressed in same language 'and all sources language confirms to follow a set of features so the codes written in two different languages can interoperate.

 



About Dinesh Thakur

Dinesh ThakurDinesh Thakur holds an B.SC (Computer Science), MCSE, MCDBA, CCNA, CCNP, A+, SCJP certifications. Dinesh authors the hugely popular blog. Where he writes how-to guides around Computer fundamental , computer software, Computer programming, and web apps. For any type of query or something that you think is missing, please feel free to Contact us.



Search Content