On an ASP.NET application I have a flag enum as follows:
[Flags] enum Target : int { None = 0, Group = 1, Student = 2, Professor = 4, All = Group |
You can save a combination of flags as an int:
int myFlags = (int)(Target.Group | Target.Professor);