C# Is there an Exception overview?

后端 未结 6 1765
孤城傲影
孤城傲影 2020-12-23 01:58

I was wondering if there\'s a list with all Exception types. I know a few Exceptions, but I don\'t know them all. Sometimes I throw an Exception and then I think, maybe .NET

6条回答
  •  清歌不尽
    2020-12-23 02:33

    A good way to see all types that derive from System.Exception in the .NET framework is by using Reflector.

    1. Type F3 to search for 'System.Exception'
    2. Select the 'System.Exception' Type
    3. Expand the 'Derived Types' tree node.

    Note that Reflector allows you to dinamically add any .NET assembly meaning that it will search for System.Exception derived types in any custom set of assemblies you provide. The most common .NET framework assemblies are added by default.

提交回复
热议问题