title: Can I use a switch statement in conjunction with string.Contains()?
body: <p>I have a method using a long string of if/elseif statements (about 10-15), and I understand that when you get past about 5 if/else if statements, it's better to use a switch. That being said, I'm not sure that I can use a switch statement in my case, because my if/else if statements rely on testing a string, not for equality, but using the Contains() method. So, right now I have something equivalent of</p>
  
  <pre><code>string s = "ABCD";
  if(s.Contains("A")
  {
      //do stuff
  }
  else if(s.Contains("E")
  {
      //do different stuff
  }
  etc ...
  </code></pre>
  
  <p>I've tried differnt ways of implementing the switch statement, such as</p>
  
  <pre><code>switch()
  {
      case(s.Contains("A"))
      {
          //do stuff
      }
  }
  </code></pre>
  
  <p>But each way I've tried results in a syntax error.</p>
  
  <p>Is there a way to use a switch statement while still testing the string using the Contains() method?</p>