1.最经常的用的方式

 public static void fn()
        {
            try
            {
                int[] a = new int[4];
                a[4] = 9;
            }
            catch
            {
                throw new Exception();
            }
        }

 2.牛逼的用法

 public static void fn2()
        {
            try
            {
                fn();
            }
            catch (Exception e)
            {
                throw new Exception("", e);
            }
        }

 

相关文章:

  • 2021-07-31
  • 2022-12-23
  • 2022-12-23
  • 2021-11-09
猜你喜欢
  • 2022-12-23
  • 2021-09-14
  • 2022-12-23
  • 2021-10-29
  • 2021-11-28
  • 2021-05-24
  • 2021-08-05
相关资源
相似解决方案