Ejemplo n.º 1
0
        static void Main(string[] args)
        {
            Collection col1 = new Collection();

            col1.Add(3);
            col1.Add(4);
            col1.Add(6);
            col1.Add(7);
            col1.Add(12);
            col1.Add(8);

            Collection col2 = new Collection();

            col2.Add(3);
            col2.Add(4);
            col2.Add(6);
            col2.Add(7);
            col2.Add(12);
            col2.Add(8);

            Console.WriteLine(col1.Equals(col2));
            Console.WriteLine(col1.Get(6));
            col1.Remove(6);
            Console.WriteLine(col1.Get(4));
            Console.WriteLine(col1.Size());
            Console.WriteLine(col1.IndexOf(6));
            col1.Insert(200, 3);
            Console.WriteLine(col1.Get(3));
            Console.WriteLine(col1.Get(4));
            Console.ReadKey();
        }
Ejemplo n.º 2
0
        static void Main(string[] args)
        {
            /*
            A a = new A();
            a.x = 3;
            B b = new B();
            b.x = 8;
            a.b = new B();
            b.a = a;
            a.b.x = 19;
            Console.WriteLine(b.x);
            */
            Collection col = new Collection();
            col.Add(2);
            col.Add(22);
            col.Add(234);

            Console.WriteLine(col.Get(3));

            int x = 0;
            int y = 0;
            bool f1, f2;
            while((f1 = x < 10) || (f2 = y < 20))
            {

            }
        }