c#获取异常对象最内层的报错信息

来源:互联网 发布:怎么投诉淘宝买家骚扰 编辑:程序博客网 时间:2024/05/18 02:50
//return InnerExceptionprivate Exception GetInnerException(Exception ex){   if (ex.InnerException != null)   {    return GetInnerException(ex.InnerException);   }  return ex;}//return InnerExceptionMessageprivate string GetInnerException(Exception ex){   if (ex.InnerException != null)   {    return GetInnerException(ex.InnerException);   }  return ex.Message;}
0 0
原创粉丝点击