ArgumentException.ParamName Property

Definition

Gets the name of the parameter that causes this exception.

public virtual string ParamName { get; }
Property Value

The parameter name.

Remarks

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.

Applies to