public bool Equals(Sandelys other) { if (other == null) { return(true); } return(Vardas.Equals(other.Vardas) && Kiekis.Equals(other.Kiekis)); }
public int CompareTo(Sandelys other) { if (other == null) { return(1); } if (Vardas.CompareTo(other.Vardas) != 0) { return(Vardas.CompareTo(other.Vardas)); } else { return(Kiekis.CompareTo(other.Kiekis)); } }
public override int GetHashCode() { return(Vardas.GetHashCode() ^ Kiekis.GetHashCode()); }