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