Message Property
[This documentation is for preview only, and is subject to change in later releases. Blank topics are included as placeholders.]
Gets a message that describes the current exception.
Namespace: System
Assembly: mscorlib (in mscorlib.dll)
Syntax
'Declaration
Public Overridable ReadOnly Property Message As String
public virtual string Message { get; }
public:
virtual property String^ Message {
String^ get ();
}
abstract Message : string with get
override Message : string with get
function get Message () : String
Property Value
Type: System. . :: . .String
The error message that explains the reason for the exception, or an empty string("").
Remarks
The text of Message should completely describe the error and should, when possible, explain how to correct it. The value of the Message property is included in the information returned by ToString.
The Message property is set only when creating an Exception. If no message was supplied to the constructor for the current instance, the system supplies a default message that is formatted using the current system culture.
.NET Framework Security
- Full trust for the immediate caller. This member cannot be used by partially trusted code. For more information, see dd66cd4c-b087-415f-9c3e-94e3a1835f74.