title: TryParse in Switch-Case Statement
body: <p>I'm making a calculator, and I'm using a switch-case statement to determine what to do when the user clicks a button. When the user just presses a number (0-9) then I want to simply just add the number to the end of the current string. This was an easy task, although I was wondering if there's an easier way to evaluate if a string is a number in a <code>case</code> statement.</p>
  
  <p>In other words, can I simplify the following:</p>
  
  <pre><code>case "0":
  case "1":
  case "2":
  case "3":
  case "4":
  case "5":
  case "6":
  case "7":
  case "8":
  case "9":
  
  //code to execute here
  </code></pre>
  
  <p>I know I can call <code>TryParse</code> earlier on and run a separate block of code, but I was wondering if there was a way to do something such as <code>case myString.TryParse():</code></p>
  
  <p>Thanks.</p>