* Type.cs:
(IsSubclassOf): return false when null. Use != instead of Equals.
svn path=/trunk/mcs/; revision=10309
+2003-01-09 Gonzalo Paniagua Javier <gonzalo@ximian.com>
+
+ * Type.cs:
+ (IsSubclassOf): return false when null. Use != instead of Equals.
+
2003-01-09 Gonzalo Paniagua Javier <gonzalo@ximian.com>
* Type.cs: fixed IsSubclassOf. Patch from Zoltan Varga.
public virtual bool IsSubclassOf (Type c)
{
if (c == null)
- throw new ArgumentNullException ("c");
+ return false;
- return !Equals (c) && type_is_subtype_of (this, c, false);
+ return (this != c) && type_is_subtype_of (this, c, false);
}
public virtual Type[] FindInterfaces (TypeFilter filter, object filterCriteria)