Switch.Value Proprietà
Importante
Alcune informazioni sono relative alla release non definitiva del prodotto, che potrebbe subire modifiche significative prima della release definitiva. Microsoft non riconosce alcuna garanzia, espressa o implicita, in merito alle informazioni qui fornite.
Ottiene o imposta il valore dell'opzione.
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
Stringa che rappresenta il valore dell'opzione.
Il valore è null
.
-oppure-
Il valore non è composto unicamente da un segno negativo facoltativo seguito da una sequenza di cifre comprese tra 0 e 9.
-oppure-
Il valore rappresenta un numero minore di Int32.MinValue o maggiore di Int32.MaxValue.
Il OnValueChanged metodo viene chiamato quando il valore della Value proprietà viene modificato. Il OnValueChanged metodo analizza il valore di questa proprietà e lo converte in un valore intero, che viene quindi utilizzato per impostare la SwitchSetting proprietà.
È necessario eseguire l'override del OnValueChanged() metodo e fornire un'operazione di conversione che imposta il valore appropriato SwitchSetting per l'opzione.
Prodotto | Versioni |
---|---|
.NET | Core 1.0, Core 1.1, Core 2.0, Core 2.1, Core 2.2, Core 3.0, Core 3.1, 5, 6, 7, 8, 9 |
.NET Framework | 2.0, 3.0, 3.5, 4.0, 4.5, 4.5.1, 4.5.2, 4.6, 4.6.1, 4.6.2, 4.7, 4.7.1, 4.7.2, 4.8, 4.8.1 |
.NET Standard | 2.0, 2.1 |
Feedback su .NET
.NET è un progetto open source. Seleziona un collegamento per fornire feedback: