Possible Duplicate:
How do you return 'not uint' in C#?
Hi Everyone, I'm trying to convert the following from VB.NET to C# and I'm getting a syntax error.
VB.NET:
Dim CurrentCRC As UInt16
CurrentCRC = &HFFFF
CurrentCRC = Not CurrentCRC
C#:
UInt16 currentCRC = default(UInt16);
currentCRC = 0xFFFF;
currentCRC = !currentCRC;
The last line is giving me the syntax error of
Operator '!' cannot be applied to operand of type 'ushort'
Any help would be appreciated!