ArgumentException.ParamName 属性

定义

获取导致该异常的参数的名称。Gets the name of the parameter that causes this exception.

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

属性值

参数名称。The parameter name.

注解

ArgumentException个都应该携带导致此异常的参数的名称。Every ArgumentException should carry the name of the parameter that causes this exception.

此属性是只读的, 返回的值与传递到构造函数中的值相同。This property is read-only, and returns the same value as was passed into the constructor. 重写方法只应用于自定义参数名称的格式。Overriding methods should be used solely to customize the format of the parameter name.

出于本地化目的, 不应转换参数名称。The parameter name should not be translated for localization purposes.

适用于