Was looking at how enums can be used as bit flags by decorating them with the flags attribute and bitwize operators (see below).
Are there any places in the .NET framework that this pattern is used? I like this but want to see some more real life examples
[Flags]
enum Days2 : int
{
  None = 0x0,
  Sunday = 0x1,
  Monday = 0x2,
  Tuesday = 0x4,
  Wednesday = 0x8,
  Thursday = 0x10,
  Friday = 0x20,
  Saturday = 0x40
}
  Days2 meetingDays = Days2.Tuesday | Days2.Thursday;
  // Set an additional flag using bitwise OR.
  meetingDays = meetingDays | Days2.Friday;
  Console.WriteLine("Meeting days are {0}", meetingDays);
				
                        
Yes - look at
MethodBase.Attributesfor example, saying whether a member is public, static etc.FileAccessandFileOptionsare file-based examples, too.If you open reflector, find
FlagsAttributeand then hit "Analyze" (Ctrl-R) and expand "used by" you'll see loads of types using it. It takes a while though :)