Beispiel #1
0
 public bool Equals(Freelancer another)
 {
     return(Name.Equals(another.Name) &&
            MonyPerHour.Equals(another.MonyPerHour) &&
            Experience.Equals(another.Experience) &&
            Gender.Equals(another.Gender));
 }
Beispiel #2
0
 public bool Equals(Employee objB)
 {
     return(((Id == null && objB.Id == null) || Id.Equals(objB.Id)) &&
            ((Salary == null && objB.Salary == null) || Salary.Equals(objB.Salary)) &&
            ((Experience == null && objB.Experience == null) || Experience.Equals(objB.Experience)) &&
            ((string.IsNullOrEmpty(Specialization) && string.IsNullOrEmpty(objB.Specialization)) || Specialization.Equals(objB.Specialization)) &&
            ((string.IsNullOrEmpty(Position) && string.IsNullOrEmpty(objB.Position)) || Position.Equals(objB.Position)) &&
            ((string.IsNullOrEmpty(Name) && string.IsNullOrEmpty(objB.Name)) || Name.Equals(objB.Name)));
 }
Beispiel #3
0
        public bool Equals(Employee employee)
        {
            if (ReferenceEquals(employee, null))
            {
                return(false);
            }

            if (ReferenceEquals(this, employee))
            {
                return(true);
            }

            if (this.GetType() != employee.GetType())
            {
                return(false);
            }

            return(Name.Equals(employee.Name) && MiddleName.Equals(employee.MiddleName) &&
                   LastName.Equals(employee.LastName) && Birthday.Equals(employee.Birthday) &&
                   Position.Equals(employee.Position) && Experience.Equals(employee.Experience));
        }