title: C# error: the out parameter must be assigned to before control leaves the current method
body: <p>The variable the error is referring to is aNumber on line (32,17), how can I fix this?</p>
  
  <pre><code>using System;
  class Calculation
  {
      public static void Main(string[] data)
      {
          double result = Convert.ToDouble( data[0]);
          char op;
          double number;
          GetData(out op, out number);
          while (op != 'q' &amp;&amp; op != 'Q')
          {
              switch (op)
              {
                  case '+':
                      result += number;
                      break;
                  case '-':
                      result -= number;
                      break;
                  case '*':
                      result *= number;
                      break;
                  case '/':
                      result /= number;
                      break;
              }
              Console.WriteLine("Result = " + result.ToString());
              GetData(out op, out number);
          }       
      }
  
      static void GetData(out char anOperator, out double aNumber)
      {
          string line;
          Console.Write("Enter an opertor and a number or 'q' to quit: ");
          line = Console.ReadLine();
          anOperator = Convert.ToChar(line.Substring(0, 1));
          if (anOperator != 'q' &amp;&amp; anOperator != 'Q')
              aNumber = Convert.ToDouble(line.Substring(2));
      }
  }
  </code></pre>