/// <summary> /// Играет роль хэш-функции для определенного типа. /// </summary> public override int GetHashCode() { unchecked { int hashCode = (int)QuotaState; hashCode = (hashCode * 397) ^ (int)Places; hashCode = (hashCode * 397) ^ IsCheckInQuota.GetHashCode(); return(hashCode); } }
/// <summary> /// Метод по определению равенства объектов /// </summary> /// <param name="other">Объект, с которым сравниваем</param> /// <returns></returns> protected bool Equals(QuotaStatePlaces other) { return(QuotaState == other.QuotaState && Places == other.Places && IsCheckInQuota.Equals(other.IsCheckInQuota)); }