What are industry standard best practices for implementing custom exceptions in C#?
问题 What are industry standard best practices for implementing custom exceptions in C#? I have checked Google and there's a great number of recommendations, however I don't know which ones hold more credibility. If anybody has any links to authoritative articles, that would also be helpful. 回答1: The standard for creating custom exceptions is to derive from Exception. You can then introduce your own properties/methods and overloaded constructors (if applicable). Here is a basic example of a custom