convert string number to int C# .net code example Example: how to convert string to int in c# string a = ("2"); int b = Convert.ToInt16(a)