static void Main(string[] args) { RandomCollection rnd = new RandomCollection(10); foreach (int memb in rnd) { Console.WriteLine(memb + " "); } }
static void Main(string[] args) { RandomCollection p = new RandomCollection(3); foreach (var a in p) { Console.WriteLine(a); } foreach (var a in p) { Console.WriteLine(a); } foreach (var a in p) { Console.WriteLine(a); } Console.Read(); }
static void Main() { do { Console.Clear(); RandomCollection randCollection = new RandomCollection(10); foreach (var i in randCollection) { Console.Write(i + " "); } Console.WriteLine(); foreach (var i in randCollection) { Console.Write(i + " "); } Console.WriteLine(); Console.WriteLine("Press Esc to exit. Press any other key to continue."); } while (Console.ReadKey(true).Key != ConsoleKey.Escape); }