Given the enum:
[Flags]
public enum mytest
{
a = 1,
b = 2,
c = 4
}
I\'ve come up with two ways to represent all va
The easiest way to ensure that all of the enum's bits are set it to just set all bits:
mytest allValues = (mytest)int.MaxValue;
This assumes that there's no problem setting bits that don't correspond to any enum, but that's likely true. You can AND this with any enum value and it will come out true, which is most likely the end goal.