.NET ez 2013-01-21
抓取 try cache Exception 錯誤編號 方法如下:
try { } catch (Exception ex) { int ErrorCode = 0; Win32Exception W32EX = ex as Win32Exception; if (W32EX == null) W32EX = ex.InnerException as Win32Exception; if (W32EX != null) ErrorCode = W32EX.ErrorCode; Console.WriteLine(ErrorCode.ToString()); }
標籤: .NET
本文章網址:
https://www.ez2o.com/Blog/Post/csharp-try-cache-Exception-ErrorCode
https://www.ez2o.com/Blog/Post/308
https://www.ez2o.com/Blog/Post/csharp-try-cache-Exception-ErrorCode
https://www.ez2o.com/Blog/Post/308