Chapter 18 Unsafe code
point value to zero, or by explicitly comparing an object reference to null.
4.1.9 Enumeration types
An enumeration type is a distinct type with named constants. Every enumeration type has an underlying type, which must be byte, sbyte, short, ushort, int, uint, long or ulong. The set of values of the enumeration type is the same as the set of values of the underlying type. Values of the enumeration type are not restricted to the values of the named constants. Enumeration types are defined through enumeration declarations (§14.1).
4.2 Reference types
A reference type is a class type, an interface type, an array type, or a delegate type.
reference-type: class-type interface-type array-type delegate-type
class-type: type-name object string
array-type: non-array-type rank-specifiers
rank-specifiers: rank-specifier rank-specifiers rank-specifier
rank-specifier: [ dim-separatorsopt ]
dim-separators: , dim-separators ,
A reference type value is a reference to an instance of the type, the latter known as an object. The special value null is compatible with all reference types and indicates the absence of an instance.
4.2.1 Class types
A class type defines a data structure that contains data members (constants and fields), function members (methods, properties, events, indexers, operators, instance constructors, destructors and static constructors), and nested types. Class types support inheritance, a mechanism whereby derived classes can extend and specialize base classes. Instances of class types are created using object-creation-expressions (§22.214.171.124).
Class types are described in §10.
Certain predefined class types have special meaning in the C# language, as described in the table below.
Copyright Microsoft Corporation 1999-2003. All Rights Reserved.79