title: Objective C: Compare two enum types not working
body: <p>I would like to do a check for two enum types, but it doesn't seem to work. I have the following:</p>
  
  <pre><code>typedef enum {
      ZSSegmentTypeE,
      ZSSegmentTypeS,
      ZSSegmentTypeO,
      ZSSegmentTypeD,
      ZSSegmentTypeN
  } ZSSegmentType;
  </code></pre>
  
  <p>The following WORKS:</p>
  
  <pre><code>if (someSegmentType != ZSSegmentTypeN) {
      // Works
  }
  </code></pre>
  
  <p>The following DOES NOT WORK:</p>
  
  <pre><code>if (someSegmentType != ZSSegmentTypeN || someSegmentType != ZSSegmentTypeD) {
       // Does NOT work
  }
  </code></pre>
  
  <p>Why doesn't this second example work, where I am testing two different enums? What am I missing in understanding how enums and comparisons work?</p>