/// <summary>
        ///     Returns a hash code for this instance.
        /// </summary>
        /// <returns>
        ///     A hash code for this instance, suitable for use in hashing algorithms and data structures like a hash table.
        /// </returns>
        public override int GetHashCode( )
        {
            int hash = 13;

            if (TimeZoneName != null)
            {
                hash = (hash * 7) + TimeZoneName.GetHashCode( );
            }

            if (OffsetFrom != null)
            {
                hash = (hash * 7) + OffsetFrom.GetHashCode( );
            }

            if (OffsetTo != null)
            {
                hash = (hash * 7) + OffsetTo.GetHashCode( );
            }

            return(hash);
        }
Example #2
0
 public override int GetHashCode()
 {
     return(Title.GetHashCode() + TimeZoneName.GetHashCode() + Latitude.GetHashCode() + Longitude.GetHashCode());
 }