So I wan't to have a generic function which works on any enum which is a flag and do a bitwise operation on it.
something like:
[Flags]
public enum MyEnum: long
{
A = 0,
B = 1 << 0,
}
public void Something<T>(ref T first, T other) where T : Enum/Flags/watever
{
first = other << 1;
}
So how do I make this work? I can't use long nor Enum instead of T and I really don't want to duplicate this function because it's silly