title: C# Operators Bitwise
body: <p>I've been looking over some game programming code and have seen enums as in:</p>
  
  <pre><code>[Flags]
  public enum CollisionCategories
  {
      Cat1 = (1 &lt;&lt; 0),
      Cat2 = (1 &lt;&lt; 1),
      Cat3 = (1 &lt;&lt; 2),
      Cat4 = (1 &lt;&lt; 3),
      ...
  }
  </code></pre>
  
  <p>Now, would this not be the same as just setting each item like 1, 2, 4, 8, ... ? I've seen the later as well. I know doing something like <code>string s = string.Empty</code> is better than <code>string s = ""</code> as far as performance goes but not sure about the enum.</p>
  
  <p>Any thoughts?</p>
  
  <p>Thanks much,</p>
  
  <p>David</p>