Message Property
[This documentation is for preview only, and is subject to change in later releases. Blank topics are included as placeholders.]
Gets the error message and the parameter name, or only the error message if no parameter name is set.
Namespace: System
Assembly: mscorlib (in mscorlib.dll)
Syntax
'Declaration
Public Overrides ReadOnly Property Message As String
public override string Message { get; }
public:
virtual property String^ Message {
String^ get () override;
}
abstract Message : string with get
override Message : string with get
override function get Message () : String
Property Value
Type: System. . :: . .String
A text string describing the details of the exception. The value of this property takes one of two forms:
Condition |
Value |
---|---|
The paramName is a null reference (Nothing in Visual Basic) or of zero length. |
The message string passed to the constructor. |
The paramName is not null reference (Nothing in Visual Basic) and it has a length greater than zero. |
The message string appended with the name of the invalid parameter. |
Remarks
This property overrides Message. The error message should be localized.
.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.