public static PoundsAndOunces operator +(PoundsAndOunces x, PoundsAndOunces y) { PoundsAndOunces c = new PoundsAndOunces { Pounds = x.Pounds + y.Pounds, Ounces = x.Ounces + y.Ounces }; return(c); }
public int CompareTo(object obj) { PoundsAndOunces other = (PoundsAndOunces)obj; if (Pounds.CompareTo(other.Pounds) < 0) { return(-1); } else if (Pounds.CompareTo(other.Pounds) > 0) { return(1); } else { return(Ounces.CompareTo(other.Ounces)); } }
public WeighIn(Angler angler, PoundsAndOunces weight) { Angler = angler; Weight = weight; }