string str = "1"; int num = int.Parse( str ); // num = 1</code></pre>
int.Parse で string を int に変換します。