是什麼VS System.SystemException的System.Exception的區別的System.Exception VS System.SystemException
回答
這裏,這可能幫助:作爲一種手段,提供Difference Between Application Exception and System Exception
到SystemException的由系統定義的異常區分與應用程序定義的異常相比
哈哈,你的編輯確切地說了我的答案。 :) – 2010-02-03 05:55:35
我沒有看到你的答案 – ata 2010-03-04 06:02:11
看一看here。
簡而言之,System.Exception
由應用程序定義,System.SystemException
由系統(.NET Framework)定義。
SystemException通常保留給.NET運行時/框架使用,而不是您的應用程序代碼。基本上,在創建自己的自定義Exception類時,不要從SystemException派生。
如果您要創建自己的Exception類,則應該從Exception或ApplicationException派生它們。 ApplicationException最初的目的是用於非框架異常,但它有些失敗。我相信框架作者現在推薦從基類Exception類派生您的自定義異常。
- 1. 'System.SystemException',而webview.InvokeSript Windows Phone中
- 2. System.Net.WebException與System.Exception的
- 3. 嘗試運行轉換的VS 2010項目時出現System.Exception
- 4. System.Exception錯誤號
- 5. MediaElement.CurrentState檢索System.Exception
- 6. 「System.Exception」的structurall的派生類是否等同於`System.Exception`?
- 7. LINQ到SQL中,System.Exception的轉換無效
- 8. WinCE 5.0上Microsoft.AGL.Common.MISC.HandleAr()的System.Exception
- 9. ClosedXML System.Exception的:語法錯誤
- 10. Visual Studio 2012 System.Exception錯誤
- 11. F#TypeProvider「XMLProvider」給出System.Exception
- 12. EventSource中使用System.Exception對象
- 13. System.Exception或只是異常
- 14. IPrincipal的自定義實現拋出System.SystemException:信任關係
- 15. 清除Flipview中的項目時的System.Exception
- 16. Xamarian/MonoTouch的:轉換System.Exception的到NSException
- 17. System.Exception的{System.ArgumentException}值不在預期範圍
- 18. New-AzureRmADAppCredential:引發類型'System.Exception'的異常
- 19. System.Exception在Silverlight中從MediaElement拋出的6028
- 20. System.Exception的:表中沒有(公共)列
- 21. 「無效的對象名稱」dbo.UserRoles'.System.Exception System.Data.SqlClient.SqlException
- 22. Silverlight中未處理的異常:System.Exception
- 23. 設置:System.Exception的:ApkFile或InstalledApp尚未配置
- 24. LINQ to XML「System.Exception:值不能爲空」
- 25. JSON字符串解析錯誤。 System.Exception {Newtonsoft.Json.JsonReaderException}
- 26. F#GROUPBY - System.Exception的:無法識別的方法調用
- 27. System.Exception的:太多的記錄類型描述:101
- 28. Visual Studio 2010中的問題圍繞全球:: System.Exception的
- 29. 使用轉換器的'System.Exception'類型的異常XAML
- 30. 的System.Exception:找不到的MSBuild運行時單
@SeanBright我很喜歡,兩年後,我發現這個問題在谷歌搜索結果的頂部 – cost 2012-04-28 10:56:27