public override int GetHashCode()
 {
     unchecked
     {
         var hashCode = Id;
         hashCode = (hashCode * 397) ^ (LastName != null ? LastName.GetHashCode() : 0);
         hashCode = (hashCode * 397) ^ (FirstName != null ? FirstName.GetHashCode() : 0);
         hashCode = (hashCode * 397) ^ (Title != null ? Title.GetHashCode() : 0);
         hashCode = (hashCode * 397) ^ (TitleOfCourtesy != null ? TitleOfCourtesy.GetHashCode() : 0);
         hashCode = (hashCode * 397) ^ BirthDate.GetHashCode();
         hashCode = (hashCode * 397) ^ HireDate.GetHashCode();
         hashCode = (hashCode * 397) ^ (Address != null ? Address.GetHashCode() : 0);
         hashCode = (hashCode * 397) ^ (City != null ? City.GetHashCode() : 0);
         hashCode = (hashCode * 397) ^ (Region != null ? Region.GetHashCode() : 0);
         hashCode = (hashCode * 397) ^ (PostalCode != null ? PostalCode.GetHashCode() : 0);
         hashCode = (hashCode * 397) ^ (Country != null ? Country.GetHashCode() : 0);
         hashCode = (hashCode * 397) ^ (HomePhone != null ? HomePhone.GetHashCode() : 0);
         hashCode = (hashCode * 397) ^ (Extension != null ? Extension.GetHashCode() : 0);
         hashCode = (hashCode * 397) ^ (Photo != null ? Photo.GetHashCode() : 0);
         hashCode = (hashCode * 397) ^ (Notes != null ? Notes.GetHashCode() : 0);
         hashCode = (hashCode * 397) ^ ReportsTo.GetHashCode();
         hashCode = (hashCode * 397) ^ (PhotoPath != null ? PhotoPath.GetHashCode() : 0);
         return(hashCode);
     }
 }
예제 #2
0
        public override int GetHashCode()
        {
            int code = 27;

            code = unchecked (
                code ^
                EmployeeID.GetHashCode() ^
                FirstName.GetHashCode() ^
                Title.GetHashCode() ^
                TitleOfCourtesy.GetHashCode() ^
                BirthDate.GetHashCode() ^
                HireDate.GetHashCode() ^
                Address.GetHashCode() ^
                City.GetHashCode() ^
                Region.GetHashCode() ^
                PostalCode.GetHashCode() ^
                Country.GetHashCode() ^
                HomePhone.GetHashCode() ^
                Extension.GetHashCode() ^
                Photo.GetHashCode() ^
                Notes.GetHashCode() ^
                ReportsTo.GetHashCode() ^
                PhotoPath.GetHashCode()
                );
            return(code);
        }
예제 #3
0
파일: Employee.cs 프로젝트: kib357/Ester2
 public override int GetHashCode()
 {
     unchecked
     {
         int hashCode = (FullName != null ? FullName.GetHashCode() : 0);
         hashCode = (hashCode * 397) ^ (Department != null ? Department.GetHashCode() : 0);
         hashCode = (hashCode * 397) ^ (Position != null ? Position.GetHashCode() : 0);
         hashCode = (hashCode * 397) ^ HireDate.GetHashCode();
         hashCode = (hashCode * 397) ^ (EmployeeNumber != null ? EmployeeNumber.GetHashCode() : 0);
         return(hashCode);
     }
 }
예제 #4
0
 public override int GetHashCode()
 {
     unchecked
     {
         int hash = 17;
         hash = hash * 23 + (BirthDate == default(DateTime) ? 0 : BirthDate.GetHashCode());
         hash = hash * 23 + (BusinessEntityId == default(int) ? 0 : BusinessEntityId.GetHashCode());
         hash = hash * 23 + (CurrentFlag == default(bool) ? 0 : CurrentFlag.GetHashCode());
         hash = hash * 23 + (Gender == null ? 0 : Gender.GetHashCode());
         hash = hash * 23 + (HireDate == default(DateTime) ? 0 : HireDate.GetHashCode());
         hash = hash * 23 + (JobTitle == null ? 0 : JobTitle.GetHashCode());
         hash = hash * 23 + (LoginId == null ? 0 : LoginId.GetHashCode());
         hash = hash * 23 + (MaritalStatus == null ? 0 : MaritalStatus.GetHashCode());
         hash = hash * 23 + (ModifiedDate == default(DateTime) ? 0 : ModifiedDate.GetHashCode());
         hash = hash * 23 + (NationalIdNumber == null ? 0 : NationalIdNumber.GetHashCode());
         hash = hash * 23 + (OrganizationLevel == null ? 0 : OrganizationLevel.GetHashCode());
         hash = hash * 23 + (Rowguid == default(Guid) ? 0 : Rowguid.GetHashCode());
         hash = hash * 23 + (SalariedFlag == default(bool) ? 0 : SalariedFlag.GetHashCode());
         hash = hash * 23 + (SickLeaveHours == default(short) ? 0 : SickLeaveHours.GetHashCode());
         hash = hash * 23 + (VacationHours == default(short) ? 0 : VacationHours.GetHashCode());
         return(hash);
     }
 }