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

屬性值

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.

適用於