2007-07-10 Zoltan Varga <vargaz@gmail.com>
+ * RuntimeTypeHandle.cs: Fix signatures of == and != operators.
+
* ModuleHandle.cs: Add missing 2.0 stuff.
2007-07-08 Zoltan Varga <vargaz@gmail.com>
return value.GetHashCode ();
}
- public static bool operator == (RuntimeTypeHandle left, RuntimeTypeHandle right)
+ public static bool operator == (RuntimeTypeHandle left, Object right)
{
- return left.Equals (right);
+ return (right != null) && (right is RuntimeTypeHandle) && left.Equals ((RuntimeTypeHandle)right);
}
- public static bool operator != (RuntimeTypeHandle left, RuntimeTypeHandle right)
+ public static bool operator != (RuntimeTypeHandle left, Object right)
{
- return !left.Equals (right);
+ return (right == null) || !(right is RuntimeTypeHandle) || !left.Equals ((RuntimeTypeHandle)right);
}
public static bool operator == (Object left, RuntimeTypeHandle right)