static void Main(string[] args) { string numberString = "1"; int numberInt = 0; int.TryParse(numberString, out numberInt); Console.WriteLine(numberInt); }