public int CompareTo(ContactData other) { if (Object.ReferenceEquals(other, null)) { return(1); } if (LastName.CompareTo(other.LastName) == 0) { return(FistName.CompareTo(other.FistName)); } else { return(LastName.CompareTo(other.LastName)); } }
public override int GetHashCode() { return(LastName.GetHashCode() + FistName.GetHashCode()); //return FIO.GetHashCode(); //return LastName.GetHashCode(); }