4 ms·
C# even has a (deprecated?) [Flags] attribute that will auto-number in this way. Edit: I was mistaken, it still requires manually setting the numbers, it just
by eterm 10y ago
C# even has a (deprecated?) [Flags] attribute that will auto-number in this way.
Edit: I was mistaken, it still requires manually setting the numbers, it just adds neater ToString support: https://msdn.microsoft.com/en-us/library/system.flagsattribute(v=vs.110).aspx https://msdn.microsoft.com/en-us/library/system.flagsattribu...
- int_19h 10y agoIt also enables Enum.HasFlag.