1、catch (Exception)和catch (Exception e)
Exception 类包含许多子类 程序执行的时候要将每一个类都搜索一遍 以找到符合的异常类 这样是蛮消耗资源的 影响效率,最好指定具体的子类
2、const readonly static
声明Class1类
调用Class1类
1、catch (Exception)和catch (Exception e)
Exception 类包含许多子类 程序执行的时候要将每一个类都搜索一遍 以找到符合的异常类 这样是蛮消耗资源的 影响效率,最好指定具体的子类
2、const readonly static
声明Class1类
调用Class1类
相关文章: