I have an enum type like this:
public enum MyEnum: ulong
{
All = 0UL,
Func1 = 1UL,
Func2 = 4UL,
Func3 = 8UL,
Func4 = 16UL,
Func5 = 32UL,
Func6 = 256UL,
// and so on...
// but notice this is the order, on purpose
}
Now, I would like to determine if it's possible, if user enters for example 9 which should be a combination of Func1 and Func3, how to get Func1 and Func3 from 9 in to the list for example. I've search this web site for answers but without luck. I need this in .net 3.5. If by some chance this is repeated question or there is similar thank you for pointing it out to me. Assume I cannot change them to be in order like 1 2 4 8 16...
Thanks