public static void Count(ICountable c, int maxCount) { for (int i = 0; i < maxCount; i++) { c.IncrementCount(); Console.WriteLine($"{c.GetCountString()}"); } }
public static void Count(ICountable c, int MaxCount) { while (c.GetCount() <= MaxCount) { Console.WriteLine(c.GetCountString() + " " + c.Name); c.IncrementCount(); } }
public static void Count(ICountable c, int MaxCount) { Console.WriteLine(""); for (; c.GetCount() <= MaxCount; c.IncrementCount()) { Console.WriteLine(c.ToString()); } c.ResetCount(); }
public static void Count(ICountable c, int maxCount) {//counts up to the specified max and prints each count while (c.GetCount() < maxCount) { c.IncrementCount(); c.FormatCount(); Thread.Sleep(500); } Console.WriteLine(); }
public static void Count(ICountable c, int maxCount) { for (int i = 1; i <= maxCount; i++) { c.IncrementCount(); Console.WriteLine(c.GetCountString() + " " + c.Name + "\n"); } c.ResetCount(); }
public void Count(ICountable c, int MaxCount) { Console.WriteLine($"Counting {c.GetType().Name}s:\n"); for (int i = 0; i < MaxCount; i++) { c.IncrementCount(); Console.WriteLine($"{c.GetCount()}. {c.ReturnName()}"); } c.ResetCount(); Console.WriteLine(""); }
public static void Count(ICountable e, int MaxCount) { int delay = 1000; for (int i = 0; i < MaxCount; i++) { e.IncrementCount(); Console.WriteLine(e.GetCountString()); Thread.Sleep(delay); } CountChuckle.AhAhAh(); Console.WriteLine(" "); }
public static void Count(ICountable c, int maxCount) { //use while to count the number of Countable objects while (maxCount != 0) { c.IncrementCount(); Console.WriteLine(c.GetCountString()); maxCount--; } Console.WriteLine(); //reset the count c.ResetCount(); }