title: Enum error: Operator '==' cannot be applied to operands of type 'object' and
body: <p>trying to compile this code but the if statement coughs up an error:</p>
  
  <blockquote>
    <p>Error 1 Operator '==' cannot be applied to operands of type 'object' and..</p>
  </blockquote>
  
  <pre><code>public enum ShoeType
  {
      soccer = 0,
      jogging=1,
      fitness=2
  }
  
  class Program
  {
      static void Main(string[] args)
      {
          string shoetype = "1";
  
          if (Enum.Parse(typeof(ShoeType), shoetype) == ShoeType.jogging)
          {
              var test = "gotcha";
          }
      }
  }
  </code></pre>