示例#1
0
        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);
        }
示例#2
0
        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();
        }
示例#3
0
        static void Main(string[] args)
        {
            RandomList rl = new RandomList();

            Console.WriteLine(rl.RandomString());
        }