title: C# Basic ATM, control flow of menu display
body: <p>Trying to make a basic ATM program for my C# class. </p>
  
  <p>In short, the program has 4 accounts which have integer values stored already. The program must display first what action the user would like to take (Display balance, Withdraw, Transfer), then take the user to selected menu and be allowed to perform whatever tasks they wish within the program.</p>
  
  <p>Just having problems with my <code>Display Balance menu</code>. Want to ask if the user would like to display another balance, and restart the Display Balance menu section(The code section here). Here is what I have:</p>
  
  <pre><code>if (ACCselect == 1)
  {
      string yesno1 = " ";
      int dispSEL = 1;
  
      Console.WriteLine();
      Console.WriteLine("$$$===Display Balance===$$$");
      Console.WriteLine();
      Console.WriteLine("\t 1) Savings Account");
      Console.WriteLine("\t 2) Debit Card Account");
      Console.WriteLine("\t 3) Credit Card Account");
      Console.WriteLine("\t 4) Investment Account");
      Console.WriteLine();
      Console.Write("Select account with 1-4: ");
  
      dispSEL = int.Parse(Console.ReadLine());
      DisplayBalance(dispSEL);
  
      Console.WriteLine();
      Console.Write("Would you like to select another account? (y/n): ");
      yesno1 = Console.ReadLine();
      if (yesno1.ToUpper() == "Y")
      {
          yesno1a = true;
      }
      else
      {
          Main();
      }
  } while (yesno1a == true)
  </code></pre>
  
  <p>This is part of <code>Main()</code>. ACCselect refers to the selection the user makes, whether they want Display Balance, Withdraw, etc.</p>
  
  <p>The <code>DisplayBalance()</code> method selects the appropriate integer value from an array and displays the corresponding balance.</p>
  
  <p>How can I get my program to repeat this section of code if the user selects "y"? 
  If the user selects "n" it loops back to the top of the Main() method alright.</p>
  
  <p>Any help would be super helpful.</p>