AntTweakBar.BoolVariable.ValidateAndSet C# (CSharp) Method

ValidateAndSet() private method

Tries to set this variable's value, validating it.
private ValidateAndSet ( bool value ) : void
value bool
return void
        private void ValidateAndSet(bool value)
        {
            if (!IsValid(value)) {
                throw new ArgumentException("Invalid variable value.");
            } else {
                this.value = value;
            }
        }