title: C# Switch-case string starting with
body: <p>Is there any way to make a case condition in a switch statement where you say if a string begins with something?</p>
  
  <p>ex</p>
  
  <pre><code>Switch (mystring)
  {
     case("abc")://String begins with abc (abcd or abc1 or abcz or abc.. or abc will fall in this condition).
        //Do Something
        break;
     default:
        break;
  }
  </code></pre>
  
  <p><strong>UPDATE</strong>
  Other strings can be different length.</p>
  
  <p>abc..</p>
  
  <p>abczyv</p>
  
  <p>dcs2.</p>
  
  <p>qwerty</p>
  
  <p>as...k</p>