covert string to int in c# code example
Example 1: string to int c#
int x = Int32.Parse("1234");
Example 2: parsing string to int c#
string userInput = Console.ReadLine();
int convert;
Int32.TryParse(userInput, out convert); // Converting String to int