I just discovered that C # will not allow you to perform bitwise operations on ulong and int . Any other combination of int , uint , long and ulong will work, but this one pairing does not work.
However, if instead of int , I have const int , everything is fine.
What's going on here? Why is int & ulong valid but const int & ulong valid?
Brocken:
int mask = 0x1110; ulong value = 0x1010; var result = mask & value;
IN:
const int mask = 0x1110; ulong value = 0x1010; var result = mask & value;
c # bitwise-operators
Bobson
source share