public override int GetHashCode() { unchecked { var hashCode = Years.GetHashCode(); hashCode = (hashCode * 397) ^ Months.GetHashCode(); hashCode = (hashCode * 397) ^ Weeks.GetHashCode(); hashCode = (hashCode * 397) ^ Days.GetHashCode(); hashCode = (hashCode * 397) ^ Hours.GetHashCode(); hashCode = (hashCode * 397) ^ Minutes.GetHashCode(); hashCode = (hashCode * 397) ^ Seconds.GetHashCode(); hashCode = (hashCode * 397) ^ Milliseconds.GetHashCode(); return(hashCode); } }
/// <summary> /// Returns the hash code for this instance. /// </summary> /// <returns>A 32-bit signed integer that is the hash code for this instance.</returns> public override int GetHashCode() { unchecked { int hash = (int)2166136261; hash = (hash * 16777619) ^ Years.GetHashCode(); hash = (hash * 16777619) ^ Months.GetHashCode(); hash = (hash * 16777619) ^ Weeks.GetHashCode(); hash = (hash * 16777619) ^ Days.GetHashCode(); hash = (hash * 16777619) ^ Hours.GetHashCode(); hash = (hash * 16777619) ^ Minutes.GetHashCode(); hash = (hash * 16777619) ^ Seconds.GetHashCode(); return(hash); } }
/// <summary> /// Provides a hash code for this object. /// </summary> /// <returns>The hash code.</returns> public override int GetHashCode() { return(_totalDays.GetHashCode() ^ Years.GetHashCode() ^ Months.GetHashCode() ^ Weeks.GetHashCode() ^ Days.GetHashCode()); }