Pass value which is the combination of enum values and get the corresponding enum strings of it.
Here is my scenario,
enum EnumDays {
NONE = 0,
SUN = 1,
MON = 2,
TUE = 4,
WED = 8,
THU = 16,
FRI = 32,
SAT = 64,
ALL = 127
}
I'll pass the value as 5, which is the combination of SUN & TUE (1 + 4 = 5).
I want to get "SUN" & "TUE" as result. How to achieve this?