BooleanSwitch.OnValueChanged Método
Definição
protected:
override void OnValueChanged();
protected override void OnValueChanged ();
override this.OnValueChanged : unit -> unit
Protected Overrides Sub OnValueChanged ()
Comentários
O OnValueChanged método determina se o novo valor é uma representação de cadeia de caracteres válida de um valor booliano ("false" ou "true").The OnValueChanged method determines whether the new value is a valid string representation of a Boolean value ("false" or "true"). Nesse caso, o método define a SwitchSetting propriedade como 0 ou 1.If so, the method sets the SwitchSetting property to 0 or 1. Caso contrário, o método base é chamado, que converte o valor da cadeia de caracteres em um valor inteiro, que é usado para definir a SwitchSetting propriedade.Otherwise, the base method is called, which converts the string value to an integer value, which is then used to set the SwitchSetting property.