Switch.Value 屬性

定義

取得或設定參數的值。

protected:
 property System::String ^ Value { System::String ^ get(); void set(System::String ^ value); };
public:
 property System::String ^ Value { System::String ^ get(); void set(System::String ^ value); };
protected string Value { get; set; }
public string Value { get; set; }
member this.Value : string with get, set
Protected Property Value As String
Public Property Value As String

屬性值

表示參數值的字串。

例外狀況

值為 null

-或-

該值並不是只由選擇性 (Optional) 負號跟隨一連串範圍從 0 到 9 的數字所組成。

-或-

值代表小於 Int32.MinValue 或大於 Int32.MaxValue 的數位。

備註

OnValueChanged當屬性的值Value變更時,會呼叫 方法。 方法 OnValueChanged 會剖析此屬性的值,並將其轉換成整數值,然後用來設定 SwitchSetting 屬性。

給繼承者的注意事項

您應該覆寫 方法, OnValueChanged() 並提供轉換作業來設定參數的適當 SwitchSetting 值。

適用於