static void Main(string[] args)
{
while (true)
{
try
{
int i = Convert.ToInt32(Console.ReadLine());
Console.WriteLine("无异常");
}
catch (Exception)
{
Console.WriteLine("对不起,程序出错");
}
finally
{
Console.WriteLine("谢谢使用");
}
}
}
转载于:https://www.cnblogs.com/Mr-xue/p/4423110.html