Given the enum:
enum
[Flags] public enum mytest { a = 1, b = 2, c = 4 }
I\'ve come up with two ways to represent all va
How about something like
var all = Enum.GetValues(typeof(MyEnum)).Cast().Last() * 2 - 1;
basically
all = max*2-1
this only works if all values are present from 1 to the max value.
1,2,4...32,64...