title: Loop conditions
body: <p>I am still learning C# and i have a quick question in regards to loop conditions. Ill will try to explain my question a clearly as possible, so i apologize ahead of time if i confuse anyone. So lets say i have a number that is in the form of a double that was inputted from a user(I picked a double because i use them mostly but this is not all inclusive, meaning it can be a decimal, or a integer as well). Now in my loop i want to have the condition set to ensure the number is not a character (I.E. the user enters the letter instead of a number.), so that when this happens a messagebox will appear saying to enter numbers only. I only ask this because i do not know how to code this and every time i run the program the whole program stops because the input was in the incorrect format. How can i code my loop to verify the input is actually numbers and not letters? I would like to have a messagebox popup saying "Enter numbers only please". I know how to do everything else except coding this part. I have tried god knows how many times to ask this question on the internet and in these forms, but i dont ever get a clear answer. 
  For those that need to see some kind of code to get a better understanding it is as follows (FYI i am using windows forms):</p>
  
  <pre><code>        double amnt = Convert.ToDouble(txtAMNT.Text);
          string Amount=txtAMNT.Text;
          double rate = Convert.ToDouble(txtRATE.Text);
          string Rate = txtRATE.Text;
          double time = Convert.ToDouble(txtTIME.Text);
          string Time=txtTIME.Text;
          double monthpay;
          double totalinterest;
          double realrate = (rate / 12)/100;
  
          if ((Amount == "")||(Rate == "")||(Time==""))
          {
              MessageBox.Show("Please fill all boxes with numbers");
          }
          else if (!(Rate == "."))
          {
              MessageBox.Show("Please enter the rate with a decimal sign ' . ' .");
          }
          else if (Amount == ",")
          {
              MessageBox.Show("Please enter the Amount without Commas ' , '");
          }
          else if ((Time == ",") || (Time == "."))
          {
              MessageBox.Show("Please enter the Duration in Months with out any decimals or commas.");
          }
          else
          {
              monthpay = amnt * realrate / (1 - Math.Pow(1 + realrate, -time));
              totalinterest = time * monthpay - amnt;
              mtbMonPay.Text = monthpay.ToString("c");
              mtbTotalInterest.Text = totalinterest.ToString("c");
  
  
          }
  </code></pre>