System.Windows.Forms.TextBoxDouble.checkValue C# (CSharp) Method

checkValue() public method

checks if the value is within its borders
public checkValue ( ) : System.Boolean
return System.Boolean
        public Boolean checkValue()
        {
            Boolean isOk = true;
            Double DoubleValue = 0;

            if(Double.TryParse(this.Text, out DoubleValue))
            {
                if(Digits != null)
                { 
                    DoubleValue = Math.Round(DoubleValue, (Int32)Digits);
                    this.Text = DoubleValue.ToString(String.Format("F{0}", Digits));
                }

                if(MinValue.HasValue && (DoubleValue < MinValue))
                    isOk = false;

                if(MaxValue.HasValue && (DoubleValue > MaxValue))
                    isOk = false;
            }
            else
                isOk = false;
            
            return isOk;
        }
TextBoxDouble