title: shorter version of OR operator in IF clause in c#
body: <p>I believe everytone knows an if clause with an 'or' in csharp:</p>
  
  <pre><code>bool bananaIsYellow = true;
  bool bananaIsBrown = false;
  if (bananaIsYellow || bananaIsBrown) bool bananaIsRipe = true;
  </code></pre>
  
  <p>the thing is that this can get very messy very fast as soon as you start to compare strings:</p>
  
  <pre><code>string bananaColor = yellow;
  if (bananaColor == "yellow" || 
      bananaColor == "brown" ||
      bananaColor == "blue")
  {
      bool bananaIsRipe = true;
  }
  </code></pre>
  
  <p>Is there any way of shortening this?</p>
  
  <p>the only way I would know is something like this (which is obviously not more beautiful or short):</p>
  
  <pre><code>string bananacolor = "yellow";
  if (StringComparer(bananacolor, new string[] { "yellow", "brown", "blue" })) { bool bananaIsRipe = true; }
  }
  private static bool StringComparer(string source, string[] values)
  {
      foreach (var value in values)
      {
          if (source == value) return true;
      }
      return false;
  }
  </code></pre>