static void Main(string[] args) { RandomList myList = new RandomList { "one", "two", "three", "four", "five", "six", "seven", "eight", "nine", "ten" }; for (int i = 0; i < 10; i++) { string randValue = myList.RandomString(); Console.Write("{0} ", randValue); } Console.WriteLine(); Console.WriteLine("left: {0}", myList.Count); }
static void Main(string[] args) { RandomList r = new RandomList(); r.Add("Greeshma"); r.Add("Rajesh"); r.Add("Haithem"); r.Add("Raji"); r.RandomString(); for (int i = 0; i < r.Count; i++) { Console.WriteLine(r[i]); } Console.ReadKey(); }
static void Main(string[] args) { RandomList rl = new RandomList(); Console.WriteLine(rl.RandomString()); }