title: C# Error 1 A local variable named 'userin' is already defined in this scope
body: <p>Error   1   A local variable named 'userin' is already defined in this scope</p>
  
  <pre><code>    myclass.fillAccounts();
  
          //int i = 0;
          //while (i != 1)
  
          string userin = null;
  
          while (userin !="x") 
          {
              //use the following menu:            
              Console.WriteLine("*****************************************");
              Console.WriteLine("enter an a or A to search account numbers");
              Console.WriteLine("enter a b or B to average the accounts");
              Console.WriteLine("enter an x or X to exit program");
              Console.WriteLine("*****************************************");
              Console.Write("Enter option--&gt;");
              userin = Console.ReadLine();
              if (userin == "a" || userin == "A")
              {
                  myclass.searchAccounts();
              }
              else if (userin == "b" || userin == "B")
              {
                  myclass.averageAccounts();
              }
              else if (userin == "x" || userin == "X")
              {
                break;
              }
  
              else
              {
                  Console.WriteLine("You entered an invalid option");
              }
          }
      }
  }
  </code></pre>
  
  <p>}</p>