I have some code written in VB that reads as follows:
Return (Not (crc32Result))
I am trying to convert it to C#, and this is what I have:
In C#, the bang(!) is used to flip a boolean variable. Are you trying to treat the uInt above as a boolean, or perform some other reversal (reversal of all binary digits, perhaps)?
I'd suggest one of these is the solution you're looking for:
return (!(bool)crc32Result); // treating as bool (0 = false, anything else is true)
return (~crc32Result); //bitwise flipping for all