jskeet / unconstrained-melody

Automatically exported from code.google.com/p/unconstrained-melody
131 stars 17 forks source link

Proposed Enhancement - GetAllBits and IsAllBIts() #14

Open GoogleCodeExporter opened 9 years ago

GoogleCodeExporter commented 9 years ago
I would like to propose adding exposure to the EnumInternals.AllBits (All 
Values Or together.) e.g. static Enums.GetAllBits<T>()  Additionally and 
complimenary, an Boolean IsAlBitsl<T>(this T value) extension would allow for 
quickly testing for All.

Thank you.

Original issue reported on code.google.com by karldirck on 15 Jan 2015 at 8:00

GoogleCodeExporter commented 9 years ago
Well there's already Flags.GetUsedBits and Flags.HasAll - could you give more 
information about what you need that isn't covered by that? If you're trying to 
do this for a non-Flags enum, that's slightly odd.

Original comment by jonathan.skeet on 16 Jan 2015 at 7:03