Exemple #1
0
 public bool Equals(Sandelys other)
 {
     if (other == null)
     {
         return(true);
     }
     return(Vardas.Equals(other.Vardas) && Kiekis.Equals(other.Kiekis));
 }
Exemple #2
0
 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));
     }
 }
Exemple #3
0
 public override int GetHashCode()
 {
     return(Vardas.GetHashCode() ^ Kiekis.GetHashCode());
 }