title: how can i use switch statement on type-safe enum pattern
body: <p>I found a goodlooking example about implementation enums in a different way. That is called <strong>type-safe enum pattern</strong> i think. I started using it but i realized that i can not use it in a switch statement. <br>
  My implementation looks like the following:<br></p>
  
  <pre><code>public sealed class MyState
  {
      private readonly string m_Name;
      private readonly int m_Value;
  
      public static readonly MyState PASSED= new MyState(1, "OK");
      public static readonly MyState FAILED= new MyState(2, "ERROR");
  
      private MyState(int value, string name)
      {
          m_Name = name;
          m_Value = value;
      }
  
      public override string ToString()
      {
          return m_Name;
      }
  
      public int GetIntValue()
      {
          return m_Value;
      }
  }
  </code></pre>
  
  <p>What can i add to my class in order to be able to use this pattern in <strong>switch</strong> statements in C#?<br>
  Thanks.</p>