I have this scenario where user has its role
NormalUser
Custodian
Finance
both Custodian and Finance is a Super
I think this might be a duplicate of How do you pass multiple enum values in C#?
Where the & bitmask can do the trick.
((Role.NormalUser & Role.All) == Role.NormalUser)
Inspecting this closer you will get the following:
0b0 & 0b11 == 0b0
However if you lets say want to check if the SuperUser is in finance you will get the following:
((Role.SuperUser & Role.Finance) == Role.Finance)
This will evaluate to:
0b11 & 0b10 == 0b10