ArgumentException.Message Property

 
System_CAPS_noteNote

The .NET API Reference documentation has a new home. Visit the .NET API Browser on docs.microsoft.com to see the new experience.

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)

override Message : string with get

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.

This property overrides Message. The error message should be localized.

Universal Windows Platform
Available since 8
.NET Framework
Available since 1.1
Portable Class Library
Supported in: portable .NET platforms
Silverlight
Available since 2.0
Windows Phone Silverlight
Available since 7.0
Windows Phone
Available since 8.1
Return to top
Show: