Ah, now i get it (I should have tested my example with more extreme long
values before posting).
Anyway, i think you misinterpret what the compiler is telling you: for
long/ulong (=Int64/UInt64) there are 2 predefined & (binary)-operators:
long operator &(long x, long y);
ulong operator &(ulong x, ulong y);
what you're trying to accomplish is the following:
operator &(long x, ulong y);
your first operand is a long, your second operand is of type ulong (you can
verify this: Console.WriteLine(0xff00000000000000L.GetType())
There is no implicit conversion between ulong and long, so the compiler is
telling you that there is no binary &-operator defined that can do what you
ask it to do.
Bottom line: & will work if both operands are long, or both operands are
ulong, but not mixed.
HTH,
Baileys