NGWS SDK Documentation  

This is preliminary documentation and subject to change.
To comment on this topic, please send us email at ngwssdk@microsoft.com. Thanks!

Introduction to the Common Language Specification (CLS)

The Common Language Specification (CLS) is discussed in greater detail below (see Common Language Specification). It is a set of conventions intended to promote language interoperability. Throughout this document, and collected together in a single section (see Collected CLS Rules), there are specific rules that must be followed in order to conform to the CLS. These rules apply only to items that are exposed for use by other programming languages. In particular, they apply to types that are visible in assemblies other those in which they are defined, and to the members (fields, methods, properties, events, and nested types) that are accessible outside the assembly (i.e. those that have an accessibility of public, family, or family or assembly).

The rules are described in a common format where they are first introduced. For example, the first rule is introduced as follows:

CLS Rule 1: Boxed value types are not part of the CLS. Instead, use System.Object, System.ValueType or System.Enum, as appropriate.

CLS (consumers): need not import boxed value types.

CLS (extenders): need not provide syntax for defining or using boxed value types.

CLS (frameworks): must not use boxed value types in their publicly exposed aspects.

The first paragraph specifies the rule itself. This is then followed by a brief description of how the rule applies in three distinct cases: