c#中預定義異常列表清單

編程的時候,能夠捕捉指定的異常是很好的習慣,但是那麼多的異常名稱卻是很難記住,這裏羅列出來,以便參考。

System..::.Object
   System..::.Exception
    System..::.SystemException
       System..::.AccessViolationException
       System..::.AppDomainUnloadedException
       System..::.ArgumentException
       System..::.ArithmeticException
       System..::.ArrayTypeMismatchException
       System..::.BadImageFormatException
       System..::.CannotUnloadAppDomainException
       System.Collections.Generic..::.KeyNotFoundException
       System..::.DataMisalignedException
       System..::.ExecutionEngineException
       System..::.FormatException
       System..::.IndexOutOfRangeException
       System..::.InvalidCastException
       System..::.InvalidOperationException
       System..::.InvalidProgramException
       System.IO..::.IOException
       System..::.MemberAccessException
       System..::.MulticastNotSupportedException
       System..::.NotImplementedException
       System..::.NotSupportedException
       System..::.NullReferenceException
       System..::.OutOfMemoryException
       System..::.RankException
       System.Reflection..::.AmbiguousMatchException
       System.Reflection..::.ReflectionTypeLoadException
       System.Resources..::.MissingManifestResourceException
       System.Runtime.InteropServices..::.ExternalException
       System.Runtime.InteropServices..::.MarshalDirectiveException
       System.Runtime.Serialization..::.SerializationException
       System.Security.Cryptography..::.CryptographicException
       System.Security..::.SecurityException
       System.Security..::.VerificationException
       System.ServiceModel..::.CommunicationException
       System.ServiceModel..::.InvalidMessageContractException
       System.ServiceModel..::.QuotaExceededException
       System..::.StackOverflowException
       System.Threading..::.SynchronizationLockException
       System.Threading..::.ThreadAbortException
       System.Threading..::.ThreadStartException
       System.Threading..::.ThreadStateException
       System..::.TimeoutException
       System..::.TypeInitializationException
       System..::.TypeLoadException
       System..::.UnauthorizedAccessException
       System.Windows.Markup..::.XamlParseException
       System.Xml..::.XmlException

 

格式有點亂,將就看吧。

發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章