static void PopulateBlizzFans() { BlizzardFan bfNew = new BlizzardFan(); bool bTryAgain = true; Console.WriteLine("Enter name:"); bfNew.sName = Console.ReadLine(); while (true == bTryAgain) { Console.WriteLine("Enter age:"); string sInput = Console.ReadLine(); if (true == uint.TryParse(sInput, out bfNew.uiAge)) { bTryAgain = false; } else { Console.WriteLine("That's not a number! Try again!"); } } bfNew.hasTicket = false; tvBlizzCon2018.AddFan(bfNew); Console.WriteLine("{0}, age {1}, has been added to the ticket queue!", bfNew.sName, bfNew.uiAge); Console.WriteLine("Press Escape to exit. Any other key to continue making fans."); }
public void AddFan(BlizzardFan _bfFan) { ticketQueue.Enqueue(_bfFan); }