Пример #1
0
 /// <inheritdoc />
 public override readonly int GetHashCode()
 {
     unchecked
     {
         var hashCode = Pt.GetHashCode();
         hashCode = (hashCode * 397) ^ Size.GetHashCode();
         hashCode = (hashCode * 397) ^ Angle.GetHashCode();
         hashCode = (hashCode * 397) ^ Response.GetHashCode();
         hashCode = (hashCode * 397) ^ Octave;
         hashCode = (hashCode * 397) ^ ClassId;
         return(hashCode);
     }
 }
Пример #2
0
        /// <summary>
        /// GetHashCodeのオーバーライド
        /// </summary>
        /// <returns>このオブジェクトのハッシュ値を指定する整数値。</returns>
#else
        /// <summary>
        /// Returns a hash code for this object.
        /// </summary>
        /// <returns>An integer value that specifies a hash value for this object.</returns>
#endif
        public override int GetHashCode()
        {
            unchecked
            {
                return(
                    Pt.GetHashCode() +
                    Size.GetHashCode() +
                    Angle.GetHashCode() +
                    Response.GetHashCode() +
                    Octave.GetHashCode() +
                    ClassId.GetHashCode());
            }
        }
Пример #3
0
        public override int GetHashCode()
        {
#if DOTNET_FRAMEWORK || NETSTANDARD2_0
            unchecked
            {
                var hashCode = Center.GetHashCode();
                hashCode = (hashCode * 397) ^ Size.GetHashCode();
                hashCode = (hashCode * 397) ^ Angle.GetHashCode();
                return(hashCode);
            }
#else
            return(HashCode.Combine(Center, Size, Angle));
#endif
        }
Пример #4
0
        /// <inheritdoc />
        public override readonly int GetHashCode()
        {
#if NET48 || NETSTANDARD2_0
            unchecked
            {
                var hashCode = Pt.GetHashCode();
                hashCode = (hashCode * 397) ^ Size.GetHashCode();
                hashCode = (hashCode * 397) ^ Angle.GetHashCode();
                hashCode = (hashCode * 397) ^ Response.GetHashCode();
                hashCode = (hashCode * 397) ^ Octave;
                hashCode = (hashCode * 397) ^ ClassId;
                return(hashCode);
            }
#else
            return(HashCode.Combine(Pt, Size, Angle, Response, Octave, ClassId));
#endif
        }
Пример #5
0
        /// <summary>
        /// GetHashCodeのオーバーライド
        /// </summary>
        /// <returns>このオブジェクトのハッシュ値を指定する整数値。</returns>
#else
        /// <summary>
        /// Returns a hash code for this object.
        /// </summary>
        /// <returns>An integer value that specifies a hash value for this object.</returns>
#endif
        public override int GetHashCode()
        {
            return(Center.GetHashCode() + Radius.GetHashCode());
        }