c# Exception object attribute summary

The properties of the Exception object in C#. When an exception occurs in the program, you need to record the information of the exception, and save or output the information to facilitate and accurately locate the source of the exception. The following are the properties of the Exception object

name Attributes Description
Data Public property Get a collection of key/value pairs that provide other user-defined exception information.
HelpLink Public property Gets or sets the link to the help file associated with this exception.
HResult Public property Get or set HRESULT (a coded numeric value assigned to a specific exception).
InnerException Public property Get the Exception instance that caused the current exception.
Message Public property Get the message describing the current exception.
Source Public property Gets or sets the name of the application or object that caused the error.
StackTrace Public property Get the string representation of the direct frame on the call stack.
TargetSite Public property Get the method that caused the current exception.

Guess you like

Origin blog.csdn.net/qq_37192571/article/details/113121023