C# formula for changing a string to an int code example Example: C# convert string to int int x = Convert.ToInt32("1234");