title: Most common C# bitwise operations on enums
body: <p>For the life of me, I can't remember how to set, delete, toggle or test a bit in a bitfield. Either I'm unsure or I mix them up because I rarely need these. So a "bit-cheat-sheet" would be nice to have.</p>
  
  <p>For example: </p>
  
  <pre><code>flags = flags | FlagsEnum.Bit4;  // Set bit 4.
  </code></pre>
  
  <p>or</p>
  
  <pre><code>if ((flags &amp; FlagsEnum.Bit4)) == FlagsEnum.Bit4) // Is there a less verbose way?
  </code></pre>
  
  <p>Can you give examples of all the other common operations, preferably in C# syntax using a [Flags] enum?</p>