共用方式為


Switch.Value 屬性

定義

取得或設定交換器的值。

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

屬性值

一個代表開關值的字串。

例外狀況

該值為 null

-或-

這個數值並非僅由一個可選的負號加上一串從 0 到 9 的數字組成。

-或-

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

備註

當房產價值Value變動時,會呼叫此OnValueChanged方法。 該 OnValueChanged 方法解析此屬性的值並將其轉換為整數值,接著用來設定 SwitchSetting 該屬性。

給繼承者的注意事項

你應該覆寫這個方法, OnValueChanged() 並提供一個轉換操作來設定適合 SwitchSetting 你的交換器值。

適用於