Type Summary
public class Object { // Constructors public Object (); // Methods public virtual bool Equals (object obj); CF public static bool Equals (object objA, object objB); ~object () ; public virtual int GetHashCode (); public Type GetType (); protected object MemberwiseClone (); CF public static bool ReferenceEquals (object objA, object objB); public virtual string ToString (); }
BA The static Equals method on Object was a relatively late addition to the class. We added it only after seeing a large number of utility versions of the same code. The common problem nearly everyone had with the instance version of Equals is that you had to make sure the value was not null before calling the Equals method. So to check to see if instances ... |
Get .NET Framework Standard Library Annotated Reference, Volume 1: Base Class Library and Extended Numerics Library now with the O’Reilly learning platform.
O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.