title: Operand ' ==' cannot be applied to operands of type (struct)
body: <pre><code>public class Human
  {
      public setGender Gender { get; set; }
  
      public void setHeight(Human Person)
      {
          if (Person.Gender == setGender.Male) // &lt;-- This is where the error is.
          {
  
          }
      }
  }
  
  public struct setGender
  {
      public static setGender Male { get; set; }
      public static setGender Female { get; set; }
  }
  </code></pre>
  
  <p>When I put in the preceding code, I get this error saying, </p>
  
  <blockquote>
    <p>operand '==' cannot be applied to operands of type 'Life.setGender'
    and 'Life.setGender'</p>
  </blockquote>
  
  <p>(The namespace is "Life" by the way. That is why it is 'Life.setGender')</p>
  
  <p>I had tried to look it up but I still don't know what that means. Could someone please help me with error.</p>
  
  <p>I am using C#.</p>