Esempio n. 1
0
        public void RECTTest1()
        {
            var dr = new Rectangle(1, 2, 2, 2);
            var r  = new RECT(dr);

            Assert.That(r.left == 1);
            Assert.That(r.top == 2);
            Assert.That(r.right == 3);
            Assert.That(r.bottom == 4);
            RECT r2 = dr;

            Assert.That(r, Is.EqualTo(r2));
            Assert.That(new RECT(0, 0, 0, 0).IsEmpty);
            Assert.That(new RECT(1, 0, 1, 0).IsEmpty, Is.False);
            Assert.That(new RECT().GetHashCode(), Is.Zero);
            Assert.That(r.GetHashCode(), Is.Not.Zero);
        }
Esempio n. 2
0
 /// <summary>
 /// Returns the hash code of the object.
 /// </summary>
 /// <returns>
 /// Hash code.
 /// </returns>
 public override int GetHashCode() => WorkArea.GetHashCode() ^ (int)Flags;
Esempio n. 3
0
 /// <summary>
 /// Devuelve el código hash del objeto.
 /// </summary>
 /// <returns>
 ///     <para>Tipo: <see cref="T:System.Int32"/></para>
 ///     <para>Código Hash.</para>
 /// </returns>
 public override int GetHashCode()
 {
     return(WorkArea.GetHashCode() ^ (int)Flags);
 }