title: How to allow user to try again or quit console program in C#?
body: <p>I have created a game that gives a player 5 chances to play after which I would like to ask the player if they would like to play again or quit. I have seen it done in Python, but I do not know python. My code works perfectly fine, but I would like to add these two additional functions
  How can I achieve these functionality in C#? 
  For reference this is what my code main class code looks like.</p>
  
  <pre><code>namespace NumBaseBall
  {
      class Program
      {
          static void Main(string[] args)
          {
              Console.WriteLine("\t\t\t*************************************");
              Console.WriteLine("\t\t\t*      Let's Have Some Fun          *");
              Console.WriteLine("\t\t\t*           Welcome To The          *");
              Console.WriteLine("\t\t\t*       Number Baseball Game        *");
              Console.WriteLine("\t\t\t*************************************\n");
  
              GameResults gameresults = new GameResults();
  
              for (int trysCounter = 1; trysCounter &lt;= 5; trysCounter++)
              {
                  gameresults.Strikes = 0; 
  
                  Random r = new Random();
                  var myRange = Enumerable.Range(1, 9);
                  var computerNumbers = myRange.OrderBy(i =&gt; r.Next()).Take(3).ToList();
                  Console.WriteLine("The Game's Three Random Integers Are: (Hidden from user)");
                   foreach (int integer in computerNumbers)
                   {
                       Console.WriteLine("{0}", integer);
                   }
  
                   List&lt;int&gt; playerNumbers = new List&lt;int&gt;();
                   Console.WriteLine("Please Enter Three Unique Single Digit Integers and Press ENTER after each:");
                   for (int i = 0; i &lt; 3; i++)
                   {
                        Console.Write("");
                        int number = Convert.ToInt32(Console.ReadLine());
                                    playerNumbers.Add(number);
                   }
  
                   gameresults.StrikesOrBalls(computerNumbers,playerNumbers);
                   Console.WriteLine("---&gt; Computer's Numbers = {0}{1}{2}", computerNumbers[0], computerNumbers[1], computerNumbers[2]);
                   Console.WriteLine("---&gt; Player's Numbers = {0}{1}{2}", playerNumbers[0], playerNumbers[1], playerNumbers[2]);
                   Console.WriteLine("---&gt; Game Results = {0} STRIKES &amp; {1} BALLS\n", gameresults.Strikes, gameresults.Balls);
                   Console.WriteLine("You have played this games {0} times\n", trysCounter);
  
                    gameresults.TotalStrikes = gameresults.TotalStrikes + gameresults.Strikes;
  
                    Console.WriteLine("STRIKES = {0} ", gameresults.TotalStrikes);
  
                     if (gameresults.TotalStrikes &gt;= 3)
                     {
                         gameresults.Wins++;
                         Console.WriteLine("YOU ARE A WINNER!!!");
                         break;
                     }
                 }
                         if (gameresults.TotalStrikes &lt;3)
                         Console.WriteLine("YOU LOSE :( PLEASE TRY AGAIN!");
             }
         }
     }
  </code></pre>