title: When are two enums equal in C#?
body: <p>I have created two enums and I know they are not the <strong>same</strong> but still I think it makes sense they would be <strong>equal</strong> since their string representation as well as their numeral representation are equal (and even the same...).</p>
  
  <p>In other words : I would like the first test to pass and the second one to fail.  In reality however, they both fail.  So : when are two enums in C# equal?  Or is there anyway to define the equals operator in C#?  </p>
  
  <p>Thanks!</p>
  
  <pre><code>    public enum enumA {one, two}
  
      public enum enumB {one, two}
  
      [Test]
      public void PreTest()
      {           
      Assert.AreEqual(enumA.one,enumB.one);
      Assert.AreSame(enumA.one, enumB.one);
      }
  </code></pre>
  
  <p>UPDATE : 1) So the answers so far all compare representations, be it ints or strings.  The enum <em>itself</em> is always unequal I gather?  No means to define equality for it?</p>