public override int GetHashCode() { unchecked { var hashCode = (NumRejestracyjny != null ? NumRejestracyjny.GetHashCode() : 0); hashCode = (hashCode * 397) ^ (Marka != null ? Marka.GetHashCode() : 0); hashCode = (hashCode * 397) ^ (Model != null ? Model.GetHashCode() : 0); hashCode = (hashCode * 397) ^ (Stan != null ? Stan.GetHashCode() : 0); hashCode = (hashCode * 397) ^ DataKontroli.GetHashCode(); return(hashCode); } }
protected bool Equals(DaneSamochodu other) { return(string.Equals(NumRejestracyjny, other.NumRejestracyjny) && string.Equals(Marka, other.Marka) && string.Equals(Model, other.Model) && string.Equals(Stan, other.Stan) && DataKontroli.Equals(other.DataKontroli)); }