Prime b

Prime b

  • NA
  • 810
  • 345k

Second Chance GUI

Dec 28 2011 2:16 PM
This is what I have done so far

            double minPayRate = 7.5;
            double maxPayRate = 49.99;
            double inputNumber;
            int count = 0;

            while (true)
            {
                inputNumber = Convert.ToDouble(inPutTextBox.Text);
                if (inputNumber >= minPayRate && inputNumber <= maxPayRate) break;
                count++;
                if (count == 2)
                    outPutLabel.Text = " You had used your two tries to enter valid hourly payment";
                return;
            }
            outPutLabel.Text = " Hourly pay rate {0:C}, while weekly pay rate is {1:C}", inputNumber, inputNumber * 40);

My problem is , how do i set button invisible after 2 tries? And I also have an error on last line for some reason, please help

Answers (17)