Beispiel #1
0
        /// <summary>
        /// Return the HashCode of this object.
        /// </summary>
        /// <returns>The HashCode of this object.</returns>
        public override Int32 GetHashCode()
        {
            unchecked
            {
                return(Value.GetHashCode() * 23 ^

                       (Context.HasValue
                            ? Context.GetHashCode() * 19
                            : 0) ^

                       (Format.HasValue
                            ? Format.GetHashCode() * 17
                            : 0) ^

                       (Measurand.HasValue
                            ? Measurand.GetHashCode() * 13
                            : 0) ^

                       (Phase.HasValue
                            ? Phase.GetHashCode() * 11
                            : 0) ^

                       (Location.HasValue
                            ? Location.GetHashCode() * 7
                            : 0) ^

                       (Unit.HasValue
                            ? Unit.GetHashCode() * 5
                            : 0));
            }
        }