The Common Language Specification

The cross-language compatibility discussed in the preceding section 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). So, if you write code that uses only CLS features, that code is guaranteed to run seamlessly with code written in any other CLS-compliant language. The CLS specifies primitive types such as Boolean, character, integer (16-, 32-, and 64-bit), Single, and Double, as well as classes such as the base Object and String along with many others. When you write code that strictly adheres to the CLS and uses only the features spelled out by the CLS, it's ...

Get Building e-Commerce Sites with the .NET Framework now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.