title: C# equivalent of C sscanf
body: <blockquote>
    <p><strong>Possible Duplicate:</strong><br>
    <a href="https://stackoverflow.com/questions/492262/is-there-an-equivalent-to-sscanf-in-net">Is there an equivalent to &#39;sscanf()&#39; in .NET?</a>  </p>
  </blockquote>
  
  
  
  <p>sscanf in C is a nice way to read well formatted input from a string.</p>
  
  <p>How to achieve this C#.</p>
  
  <p>For example,</p>
  
  <pre><code>int a,b;
  char *str= "10 12";
  sscanf(str,"%d %d",&amp;a,&amp;b);
  </code></pre>
  
  <p>The above code will assign 10 to a and 12 to b.</p>
  
  <p>How to achieve the same using C#?</p>