Exemplo n.º 1
0
        public override int GetHashCode()
        {
            int hashFirstName = Name == null ? 0 : Name.GetHashCode();
            int hashLastName  = Jmbag == null ? 0 : Jmbag.GetHashCode();

            return(hashFirstName ^ hashLastName);
        }
Exemplo n.º 2
0
        public override int GetHashCode()
        {
            int hashName  = Name.GetHashCode();
            int hashJmbag = Jmbag.GetHashCode();

            return(hashName ^ hashJmbag);
        }
Exemplo n.º 3
0
        public override int GetHashCode()
        {
            int hashName  = Name == null ? 0 : Name.GetHashCode();
            int hashJmbag = Jmbag == null ? 0 : Jmbag.GetHashCode();

            int hash = hashName ^ hashJmbag;

            return(hash);
        }
Exemplo n.º 4
0
 public override int GetHashCode()
 {
     unchecked
     {
         var hashCode = (Name != null ? Name.GetHashCode() : 0);
         hashCode = (hashCode * 397) ^ (Jmbag != null ? Jmbag.GetHashCode() : 0);
         hashCode = (hashCode * 397) ^ (int)Gender;
         return(hashCode);
     }
 }
Exemplo n.º 5
0
        public override int GetHashCode()

        {
            // If two products are equal, they will have the same hash code.

            // Two products are equal if their ID matches, so the easiest way to do this is

            // just to return the Id.GetHashCode().

            return(Jmbag.GetHashCode());
        }
Exemplo n.º 6
0
 public override int GetHashCode()
 {
     if (Name == null || Jmbag == null)
     {
         return(0);
     }
     else
     {
         return(Name.GetHashCode() ^ Jmbag.GetHashCode());
     }
 }
Exemplo n.º 7
0
 public override int GetHashCode()
 {
     return(Jmbag.GetHashCode());
 }
Exemplo n.º 8
0
        public override int GetHashCode()
        {
            int i = Gender == Gender.Male ? 1 : 0;

            return(Name.GetHashCode() + Jmbag.GetHashCode() + i + 7);
        }
Exemplo n.º 9
0
        public override int GetHashCode()
        {
            unchecked
            {
                // Choose large primes to avoid hashing collisions
                const int HashingBase       = (int)2166136261;
                const int HashingMultiplier = 16777619;

                int hash = HashingBase;
                hash = (hash * HashingMultiplier) ^ (!Object.ReferenceEquals(null, Name) ? Name.GetHashCode() : 0);
                hash = (hash * HashingMultiplier) ^ (!Object.ReferenceEquals(null, Jmbag) ? Jmbag.GetHashCode() : 0);
                hash = (hash * HashingMultiplier) ^ (!Object.ReferenceEquals(null, Gender) ? Gender.GetHashCode() : 0);
                return(hash);
            }
        }
Exemplo n.º 10
0
 public override int GetHashCode()
 {
     return(Jmbag.GetHashCode() * Name.GetHashCode() * Gender.GetHashCode());
 }
Exemplo n.º 11
0
 public override int GetHashCode()
 {
     unchecked
     {
         return(((Name != null ? Name.GetHashCode() : 0) * 397) ^ (Jmbag != null ? Jmbag.GetHashCode() : 0));
     }
 }
Exemplo n.º 12
0
 public override int GetHashCode()
 {
     return(Name.GetHashCode() * 17 + Jmbag.GetHashCode());
 }
Exemplo n.º 13
0
 public override int GetHashCode() => Jmbag.GetHashCode();