-
C# bitwise operations.
In the code
Code:
UInt64 mask = (UInt64)((message[4] << 48) | (message[5] << 40) | (message[6] << 32) | (message[7] << 24) |
(message[8] << 16) | (message[9] << 8) | message[10]);
for (UInt64 i = 0; i < 64; i++)
{
UInt64 c = mask & ((UInt64)(1) << i);
}
I get
Error CS0019 Operator '<<' cannot be applied to operands of type 'ulong' and 'ulong'
Should I split UInt64 for two UInt32 or is there any way around?
-
> Should I split UInt64 for two UInt32 or is there any way around?
> for (UInt64 i = 0; i < 64; i++)
Overkill much?
You can count to 64 in a byte ffs.