title: Error. Cannot assign because it is a method group
body: <pre><code>Static void Main(string[] args)
      {
          double x;
          double y;
          char symbol;
          Console.WriteLine("First number: ");
          x = double.Parse(Console.ReadLine());
          Console.WriteLine("Second number: ");
          y = double.Parse(Console.ReadLine());
          Console.WriteLine("+ or - or * or / ?: ");
          symbol = (char)Console.Read();
          Console.Clear();
          Console.WriteLine("First number = {0,0:f} \nSecond number = {1,0:f} \nResult = {2,0:f}", x, y, answer(x, y, symbol));
      }
      static double answer(double a, double b, char simb)
      {
  
          if (simb == '+')
             answer = a + b;
          else
              if (simb == '-')
                 answer = a - b;
              else
                  if (simb == '*')
                      answer = a * b;
                  else
                      if (simb == '/')
                        answer = a / b;
                      else
                          Console.WriteLine("Error");
  </code></pre>
  
  <p>I am doing project for my class. It's a little calculator, where you put in first number, than second and then choose a + - * or /. Unfortunately there is an error witch i don't know how to fix. Any ideas?</p>