ExceptionAnalyzer icon indicating copy to clipboard operation
ExceptionAnalyzer copied to clipboard

Define constructors for serialization

Open cezarypiatek opened this issue 6 years ago • 0 comments

https://docs.microsoft.com/en-us/dotnet/csharp/programming-guide/exceptions/creating-and-throwing-exceptions#defining-exception-classes

The derived classes should define at least four constructors: one default constructor, one that sets the message property, and one that sets both the Message and InnerException properties. The fourth constructor is used to serialize the exception. New exception classes should be serializable. For example:

cezarypiatek avatar Apr 11 '19 19:04 cezarypiatek