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.6 Unary expressionsprevious at this levelnext at this level 14.6.4 Bitwise complement operator Paragraph 11 For an operation of the form ~x, unary operator overload resolution (§14.2.3) is applied to select a specific operator implementation. 2 The operand is converted to the parameter type of the selected operator, and the type of the result is the return type of the operator. 3 The predefined bitwise complement operators are:
int operator ~(int x);  
uint operator ~(uint x);  
long operator ~(long x);  
ulong operator ~(ulong x);  
Paragraph 21 For each of these operators, the result of the operation is the bitwise complement of x. Paragraph 31 Every enumeration type E implicitly provides the following bitwise complement operator:
E operator ~(E x);  
Paragraph 41 The result of evaluating ~x, where x is an expression of an enumeration type E with an underlying type U, is exactly the same as evaluating (E)(~(U)x).
{ JSL }
Jagger Software Ltd
Company # 4070126
VAT # 762 5213 42
Valid HTML 4.01Valid CSS