title: Extract number from end of string
body: <p>I have some strings like "pan1", "pan2", and "pan20" etc. I need to extract number. I use it:</p>
  
  <pre><code>char ch = s[(s.Length) - 1];
  int n = Convert.ToInt32(Char.GetNumericValue(ch));
  </code></pre>
  
  <p>But in case of, for example, "pan20" the result is not correct 0.</p>