provided by: 
Originally published at Internet.comThe following is extracted from the book Applied Microsoft .NET Framework Programming by Jeffrey Richter (Microsoft Press, 2002, ISBN: 0-7356-1422-9). Copyright 2002, Jeffrey Richter. Reproduced by permission of Microsoft Press. All rights reserved. -----------------------------------
Common Object Operations
In this chapter, I'll describe how to properly implement the operations that all objects must exhibit. Specifically, I'll talk about object equality, identity, hash codes, and cloning.
Object Equality and Identity
The System.Object type offers a virtual method, named Equals, whose purpose is to return true if two objects have the same "value". The .NET Framework Class Library (FCL) includes many methods, such as System.Array's IndexOf method and System.Collections.ArrayList's Contains method, that internally call Equals. Because Equals is defined by Object and because every type is ultimately derived from Object, every instance of every type offers the Equals method. For types that don't explicitly override Equals, the implementation provided by Object (or the nearest base class that overrides Equals) is inherited. The following code shows how System.Object's Equals method is essentially implemented: class Object { public virtual Boolean Equals(Object obj) { // If both references point to the same // object, they must be equal. if (this == obj) return(true); // Assume that the objects are not equal. return(false); } ' } ...
Read article at Internet.com site