C#基础总结(二)

异常捕获: try {    有可能出现错误的代码写在这里 } catch {    出错后的处理 } 上面的程序如何运行: 如果try中的代码没有出错,则程序正常运行 try中的代码,不会执行catch中的代码;否则 直接跳到catch中执行代码! class Program { static void Main(string[] args) {
相关文章
相关标签/搜索