title: What is the reason for marking an enum with the [Flags] attribute?
body: <p>We recently ported an old C# app from Visual Studio 2003 to Visual Studio 2010.</p>
  
  <p>In searching for things to clean up in the code, I ran Resharper on it, and it tells me (oodles of times), "Bitwise operation on enum which is not marked by [Flags] attribute"</p>
  
  <p>e.g., here is a bit of code that it "flags" (no pun intended) with that message:</p>
  
  <pre><code>~DuckbillConverter()
  {
      //stop running thread
      if((this.Status &amp; ConvertStatus.Running) == ConvertStatus.Running)
          this.Stop();
  }
  </code></pre>
  
  <p>I assume that this code is working as is; so what would be the benefit (or, even more importantly, any possible side effects) of decorating ConvertStatus.Running with the [Flags] attribute, as R# recommends?</p>
  
  <h2>UPDATE</h2>
  
  <p>Answer to Jon Skeet:</p>
  
  <pre><code>public enum ConvertStatus
  {
      /// &lt;summary&gt;
      /// The thread is not running, there are no manual conversions or purges and no errors have occurred.
      /// &lt;/summary&gt;
      Stopped = 0x0,
      /// &lt;summary&gt;
      /// The thread is running and will automatically convert all sites for both file types.
      /// &lt;/summary&gt;
      Running = 0x1,
      /// &lt;summary&gt;
      /// A data conversion is currently taking place.
      /// &lt;/summary&gt;
      Converting = 0x2,
      /// &lt;summary&gt;
      /// A data purge is currently taking place.
      /// &lt;/summary&gt;
      Purging = 0x4,
      /// &lt;summary&gt;
      /// An error has occurred.  Use the LastError property to view the error message.
      /// &lt;/summary&gt;
      Error = 0x8
  }
  </code></pre>