public new int CompareTo(object obj1) { Waybill w1 = new Waybill(); Waybill w2 = new Waybill("1234", 2019); if (w1.Year > w2.Year) { return(-1); } else if (w1.Year == w2.Year) { return(0); } else { return(1); } }
public Point() { Random rnd = new Random(); int m = rnd.Next(1, 5); switch (m) { case 1: Document d = new Document(); key = d; value = key.GetHashCode(); next = null; break; case 2: Quittance q = new Quittance(); key = q; value = key.GetHashCode(); next = null; break; case 3: Check c = new Check(); key = c; value = key.GetHashCode(); next = null; break; case 4: Waybill w = new Waybill(); key = w; value = key.GetHashCode(); next = null; break; } }