public bool Equals(HWND other) { if (Object.ReferenceEquals(other, null)) { return handle == IntPtr.Zero; } else { return other.handle == handle; } }