コード例 #1
0
        //--------------------------------------------------------------
        #region Overrides
        //--------------------------------------------------------------

        /// <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()
        {
            // ReSharper disable NonReadonlyFieldInGetHashCode
            unchecked
            {
                int hashCode = Position.GetHashCode();
                hashCode = (hashCode * 397) ^ Orientation.GetHashCode();
                return(hashCode);
            }
            // ReSharper restore NonReadonlyFieldInGetHashCode
        }
コード例 #2
0
 public void HashCode()
 {
   Matrix33D m = new Matrix33D(columnMajor, MatrixOrder.ColumnMajor);
   Assert.AreNotEqual(Matrix33D.Identity.GetHashCode(), m.GetHashCode());
 }
コード例 #3
0
ファイル: Matrix33DTest.cs プロジェクト: Zolniu/DigitalRune
 public void HashCode()
 {
     Matrix33D m = new Matrix33D(columnMajor, MatrixOrder.ColumnMajor);
       Assert.AreNotEqual(Matrix33D.Identity.GetHashCode(), m.GetHashCode());
 }