GetHashCode() public method

public GetHashCode ( ) : int
return int
		public static void KillTimer (IntPtr timerId)
		{
			Timer t = (Timer) TimerStore[timerId.GetHashCode()];
			t.Stop ();
			t.Elapsed -= new ElapsedEventHandler (InternalTimerElapsed);
			t.Dispose ();
			TimerStore.Remove (timerId.GetHashCode());
		}
Beispiel #2
0
 /// <summary>
 /// Gets a unique hash code for this instance.
 /// </summary>
 /// <returns>A hash code.</returns>
 public override Int32 GetHashCode() => xMin.GetHashCode() ^ yMin.GetHashCode() ^ xMax.GetHashCode() ^ yMax.GetHashCode();
 private static uint InitHash(IntPtr handle, int hashsize, out uint seed, out uint incr)
 {
     uint num = (uint) (handle.GetHashCode() & 0x7fffffff);
     seed = num;
     incr = 1 + ((uint) (((seed >> 5) + 1) % (hashsize - 1)));
     return num;
 }
Beispiel #4
0
 public override int GetHashCode()
 {
     return(_value.GetHashCode());
 }
Beispiel #5
0
 /// <summary>
 /// Gets a unique hash code for this instance.
 /// </summary>
 /// <returns>A unique hash code.</returns>
 public override int GetHashCode()
 {
     return(requestType.GetHashCode() ^ width.GetHashCode() ^ height.GetHashCode() ^ horiResolution.GetHashCode() ^ vertResolution.GetHashCode());
 }
Beispiel #6
0
 public static void GetHashCodeRespectAllBits()
 {
     var ptr1 = new IntPtr(0x123456FFFFFFFF);
     var ptr2 = new IntPtr(0x654321FFFFFFFF);
     Assert.NotEqual(ptr1.GetHashCode(), ptr2.GetHashCode());
 }
Beispiel #7
0
 public static void Equals(IntPtr ptr1, object obj, bool expected)
 {
     if (obj is IntPtr)
     {
         IntPtr ptr2 = (IntPtr)obj;
         Assert.Equal(expected, ptr1 == ptr2);
         Assert.Equal(!expected, ptr1 != ptr2);
         Assert.Equal(expected, ptr1.GetHashCode().Equals(ptr2.GetHashCode()));
     }
     Assert.Equal(expected, ptr1.Equals(obj));
     Assert.Equal(ptr1.GetHashCode(), ptr1.GetHashCode());
 }
Beispiel #8
0
 public override int GetHashCode()
 {
     return(Handle.GetHashCode());
 }
Beispiel #9
0
 public override int GetHashCode()
 {
     return(method.GetHashCode() ^ (m_target != null ? m_target.GetHashCode() : 0));
 }
Beispiel #10
0
 public override int GetHashCode()
 {
     return(sig.GetHashCode());
 }
Beispiel #11
0
 /// <summary>
 /// Gets a unique hash code for this instance.
 /// </summary>
 /// <returns>A hash code.</returns>
 public override int GetHashCode()
 {
     //TODO better hash algo
     return(xMin.GetHashCode() ^ yMin.GetHashCode() ^ xMax.GetHashCode() ^ yMax.GetHashCode());
 }
Beispiel #12
0
 public sealed override int GetHashCode()
 {
     return(Address0.GetHashCode());
 }
Beispiel #13
0
 public override int GetHashCode()
 {
     return(_xMin.GetHashCode() ^ _yMin.GetHashCode() ^ _xMax.GetHashCode() ^ _yMax.GetHashCode());
 }