make int string to int 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: convert string to number C#
int x = 0;
Int32.TryParse(TextBoxD1.Text, out x);