Example #1
0
        internal MainClass()
        {
            Random r = new Random();

            for (int i = 0; i < auxs.Length; i++)
            {
                auxs[i]  = new Aux(r.Next(10), r.Next(10));
                auxs2[i] = new Aux2(r.Next(10), r.Next(10), r.Next(10));
            }
        }
Example #2
0
        public static int comparaDatos(object obj1, object obj2)
        {
            Aux2   a3 = (Aux2)obj1;
            Aux2   a4 = (Aux2)obj2;
            double d1 = a3.A + a3.B;
            double d2 = a4.A + a4.B;

            if (d1 > d2)
            {
                return(1);
            }
            if (d1 < d2)
            {
                return(-1);
            }
            return(0);
        }