private void UpdateText() { switch (InputType) { case NumberType.Float: TextBox.Text = FloatValue.Format(decimalsToDisplay); break; case NumberType.Int: TextBox.Text = IntValue.ToString(); break; } }