O'Reilly logo

C# 5.0 Unleashed by Bart De Smet

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

A Word on CLS Compliance

Chapter 1, “Introducing the .NET Platform,” stressed the importance of cross-language interoperability in the vision statement of .NET. One key criterion for success in this space is ensuring that types created in one language can be used or extended from another language. This is where the Common Language Specification (CLS) comes into play.

Before delving any deeper, let’s revisit the first rule of the CLS:

CLS Rule 1: CLS rules apply only to those parts of a type that are accessible or visible outside of the defining assembly.

We haven’t talked about visibility yet, but the idea is rather simple. Assemblies contain types, some of which can be exposed to the outside world. A similar observation holds for types in relation ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required