Ejemplo n.º 1
0
        static void Main(string[] args)
        {
            // Create RandomList
            RandomList list = new RandomList();

            // Add some data to the RandomList
            list.Add(42);
            list.Add("fourty two");
            list.Add(3.14);

            // Print the RandomList
            Console.WriteLine("Print: {0}", string.Join(", ", list.ToArray()));

            // Remove some data from the RandomList
            Console.WriteLine("Remove: {0}", list.RandomObject());
            Console.WriteLine("Remove: {0}", list.RandomObject());
            Console.WriteLine("Remove: {0}", list.RandomObject());
        }
Ejemplo n.º 2
0
        static void Main(string[] args)
        {
            RandomList rndList = new RandomList();

            for (int i = 0; i < 10; i++)
            {
                rndList.Add("Str - " + i);
            }

            Console.WriteLine(rndList.RandomString());

            Console.WriteLine(string.Join(", ", rndList));
        }