0
在腳本#中,是否可以定義自己的異常類?因爲它是密封的,我不能從Exception派生:腳本#:支持自定義異常類
public class MyException : Exception {} // Cannot inherit from sealed class Exception
如果我試着投不從異常繼承例外,我得到另一個錯誤:
Error 22 The type caught or thrown must be derived from System.Exception
好像不存在用於支持這個?