int value covert string c# code example
Example 1: c# how to convert string to int
string str = "100";
int x = Int32.Parse(str); // or int.Parse();
Console.WriteLine(x);
Example 2: how to parse a string to an integer c#
string str = "10s";
int x = Convert.ToInt32(str);
Console.WriteLine(x);