Was this page helpful?
Your feedback about this content is important. Let us know what you think.
Additional feedback?
1500 characters remaining
Export (0) Print
Expand All

ArgumentException.Message Property

Gets the error message and the parameter name, or only the error message if no parameter name is set.

[Visual Basic]
Overrides Public ReadOnly Property Message As String
[C#]
public override string Message {get;}
[C++]
public: __property String* get_Message();
[JScript]
public override function get Message() : String;

Property Value

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.

Requirements

Platforms: Windows 98, Windows NT 4.0, Windows Millennium Edition, Windows 2000, Windows XP Home Edition, Windows XP Professional, Windows Server 2003 family, .NET Compact Framework

See Also

ArgumentException Class | ArgumentException Members | System Namespace

Show:
© 2015 Microsoft