示例#1
0
 /// <summary>
 /// Сравнивает объекты
 /// </summary>
 /// <param name="other"></param>
 /// <returns></returns>
 protected bool Equals(Person other)
 {
     return(Id == other.Id && string.Equals(SurName.ToLower(), other.SurName.ToLower()) && string.Equals(Name.ToLower(), other.Name.ToLower()) &&
            string.Equals(Patronymic.ToLower(), other.Patronymic.ToLower()) && string.Equals(Organization, other.Organization) &&
            string.Equals(Position, other.Position) && string.Equals(Email, other.Email) &&
            string.Equals(NumberPhone, other.NumberPhone));
 }
示例#2
0
        public override int GetHashCode()
        {
            string var = Name.ToLower().Trim()
                         + SurName.ToLower().Trim()
                         + Age
                         + Experience
                         + Profession;

            return(var.ToString().GetHashCode());
        }