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)); } }
public static int comparaDatos(object obj1, object obj2) { Aux a1 = (Aux)obj1; Aux a2 = (Aux)obj2; int d1 = a1.A + a1.B; int d2 = a2.A + a2.B; if (d1 > d2) { return(1); } if (d1 < d2) { return(-1); } return(0); }