📅  最后修改于: 2022-03-11 14:49:05.238000             🧑  作者: Mango
string val;
Console.Write("Enter integer: ");
val = Console.ReadLine();
Now convert it to integer −
int a = Convert.ToInt32(val);
Console.WriteLine("Your input: {0}",a);