-------------------------- ASP.Net+Android+IOS开发、.Net培训、期待与您交流! --------------------------
try()
{
}
catch(<exception type>e)
{
}
finally
{
}
try——包含抛出异常的代码
catch——包含抛出异常时要执行的的代码,可以有多个catch块
finally——无论是否异常都会执行的代码
throw new Exception (ex.message) 系统提示异常信息
throw new Exception(“数据类型错误”)
自己定义异常提示信息
-------------------------- ASP.Net+Android+IOS开发、.Net培训、期待与您交流! --------------------------