Jon Jagger
jon@jaggersoft.com
Table of Contents 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 Notes DownloadECMA-334 C# Language Specificationpreviousnextprevious at this levelnext at this level 11 Types Paragraph 11 The types of the C# language are divided into two main categories: Value types and reference types. type : value-type reference-type Paragraph 21 A third category of types, pointers, is available only in unsafe code. 2 This is discussed further in §25.2. Paragraph 31 Value types differ from reference types in that variables of the value types directly contain their data, whereas variables of the reference types store references to their data, the latter being known as objects. 2 With reference types, it is possible for two variables to reference the same object, and thus possible for operations on one variable to affect the object referenced by the other variable. 3 With value types, the variables each have their own copy of the data, and it is not possible for operations on one to affect the other. Paragraph 41 C#'s type system is unified such that a value of any type can be treated as an object. 2 Every type in C# directly or indirectly derives from the object class type, and object is the ultimate base class of all types. 3 Values of reference types are treated as objects simply by viewing the values as type object. 4 Values of value types are treated as objects by performing boxing and unboxing operations (§11.3).
{ JSL }
Jagger Software Ltd
Company # 4070126
VAT # 762 5213 42
Valid HTML 4.01Valid CSS