ArgumentOutOfRangeException.Message ArgumentOutOfRangeException.Message ArgumentOutOfRangeException.Message ArgumentOutOfRangeException.Message Property

定义

获取错误消息和无效参数值的字符串表示形式;或者,如果该参数值为 null,则仅获取错误消息。Gets the error message and the string representation of the invalid argument value, or only the error message if the argument value is null.

public:
 virtual property System::String ^ Message { System::String ^ get(); };
public override string Message { get; }
member this.Message : string
Public Overrides ReadOnly Property Message As String

属性值

此异常的文本消息。The text message for this exception. 此属性的值采用以下两种形式之一。The value of this property takes one of two forms, as follows.

条件Condition Value
actualValuenullThe actualValue is null. 传递到构造函数的 message 字符串。The message string passed to the constructor.
actualValue 不为 nullThe actualValue is not null. 附有无效参数值字符串表示形式的 message 字符串。The message string appended with the string representation of the invalid argument value.

注解

此属性将替代MessageThis property overrides Message.

错误消息应描述导致此异常的参数的预期值。The error message should describe the expected values of the parameter that causes this exception. 应本地化错误消息。The error message should be localized.

适用于