GetHashCode() публичный Метод

Accompanies Equals, using the name's HashCode as return.
public GetHashCode ( ) : int
Результат int
Пример #1
0
        public override int GetHashCode()
        {
            int hash = 1;

            if (roomInfo_ != null)
            {
                hash ^= RoomInfo.GetHashCode();
            }
            hash ^= cards_.GetHashCode();
            hash ^= playerInfos_.GetHashCode();
            if (RoomState != 0)
            {
                hash ^= RoomState.GetHashCode();
            }
            if (WhoseTurn != 0)
            {
                hash ^= WhoseTurn.GetHashCode();
            }
            if (LeftCardCount != 0)
            {
                hash ^= LeftCardCount.GetHashCode();
            }
            if (LeftTurnTime != 0F)
            {
                hash ^= LeftTurnTime.GetHashCode();
            }
            if (LastPlayedCardId != 0)
            {
                hash ^= LastPlayedCardId.GetHashCode();
            }
            return(hash);
        }