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 21 Enumsprevious at this levelnext at this level 21.4 Enum values and operations Paragraph 11 Each enum type defines a distinct type; an explicit enumeration conversion (§13.2.2) is required to convert between an enum type and an integral type, or between two enum types. 2 The set of values that an enum type can take on is not limited by its enum members. 3 In particular, any value of the underlying type of an enum can be cast to the enum type, and is a distinct valid value of that enum type. Paragraph 21 Enum members have the type of their containing enum type (except within other enum member initializers: see §21.3). 2 The value of an enum member declared in enum type E with associated value v is (E)v. Paragraph 31 The following operators can be used on values of enum types: ==, !=, <, >, <=, >= (§14.9.5), + (§14.7.4), (§14.7.5), -^, &, | (§14.10.2), ~ (§14.6.4), ++, (§14.5.9 --and §14.6.5), and sizeof (§25.5.4). Paragraph 41 Every enum type automatically derives from the class System.Enum. 2 Thus, inherited methods and properties of this class can be used on values of an enum type.
{ JSL }
Jagger Software Ltd
Company # 4070126
VAT # 762 5213 42
Valid HTML 4.01Valid CSS