コード例 #1
0
        public override int GetHashCode()
        {
            unchecked
            {
                var hashCode = Name != null?Name.GetHashCode() : 0;

                hashCode = (hashCode * 397) ^ (Surename != null ? Surename.GetHashCode() : 0);
                hashCode = (hashCode * 397) ^ (Address != null ? Address.GetHashCode() : 0);
                hashCode = (hashCode * 397) ^ (Birthdate != null ? Birthdate.GetHashCode() : 0);
                return(hashCode);
            }
        }
コード例 #2
0
ファイル: InputMsg.cs プロジェクト: codacy-badger/motornet
        public override int GetHashCode()
        {
            int hash = 1;

            if (Forename.Length != 0)
            {
                hash ^= Forename.GetHashCode();
            }
            if (Surename.Length != 0)
            {
                hash ^= Surename.GetHashCode();
            }
            if (Age != 0)
            {
                hash ^= Age.GetHashCode();
            }
            return(hash);
        }