using System; using System.Collections.Generic; using System.Linq; using System.Text; //2014.3.14 namespace _6.异常 { class Program { static void Main(string[] args) { try { Console.WriteLine("Convert之前"); int a = Convert.ToInt32(Console.ReadLine()); Console.WriteLine("Convert之后"); } catch (Exception ex) { Console.WriteLine("输入错误:"+ex.Message+"异常堆栈:"+ex.StackTrace); }