Esempio n. 1
0
        /// <summary>
        /// Serves as a hash function for a particular type.
        /// </summary>
        /// <returns>
        /// A hash code for the current <see cref="T:System.Object"/>.
        /// </returns>
        /// <filterpriority>2</filterpriority>
        public override int GetHashCode()
        {
            unchecked
            {
                int result = FirstStreetAddress != null?FirstStreetAddress.GetHashCode() : 0;

                result = (result * 397) ^ (SecondStreetAddress != null ? SecondStreetAddress.GetHashCode() : 0);
                result = (result * 397) ^ (CityName != null ? CityName.GetHashCode() : 0);
                result = (result * 397) ^ (CountyArea != null ? CountyArea.GetHashCode() : 0);
                result = (result * 397) ^ (StateProvince != null ? StateProvince.GetHashCode() : 0);
                result = (result * 397) ^ (Country != null ? Country.GetHashCode() : 0);
                result = (result * 397) ^ (PostalCode != null ? PostalCode.GetHashCode() : 0);
                return(result);
            }
        }