title: Convert String Builder to Integer in c#
body: <p>I am new programmer in C# and I wanna know if there is a direct way to convert from StringBuilder to int. I have the following code. On the last line of the code I get an error.</p>
  
  <pre><code>StringBuilder newnum = new StringBuilder();
  for (int i = x.Length - 1; i &gt;= 0; i--)
  {
      newnum.Append(x[i]);  
  }
  int x = Convert.ToInt32(newnum);
  </code></pre>