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 14 Expressionsprevious at this levelnext at this level 14.9 Relational and type-testing operatorsprevious at this levelnext at this level 14.9.5 Enumeration comparison operators Paragraph 11 Every enumeration type implicitly provides the following predefined comparison operators:
bool operator ==(E x, E y);  
bool operator !=(E x, E y);  
bool operator <(E x, E y);  
bool operator >(E x, E y);  
bool operator <=(E x, E y);  
bool operator >=(E x, E y);  
Paragraph 21 The result of evaluating x op y, where x and y are expressions of an enumeration type E with an underlying type U, and op is one of the comparison operators, is exactly the same as evaluating ((U)x) op ((U)y). 2 In other words, the enumeration type comparison operators simply compare the underlying integral values of the two operands.
{ JSL }
Jagger Software Ltd
Company # 4070126
VAT # 762 5213 42
Valid HTML 4.01Valid CSS