Collapse AllExpand All      Code: All Code: Multiple Code: Visual Basic Code: C# Code: Visual C++ Code: F# Code: JScript 
Equals Method (Object)

[This documentation is for preview only, and is subject to change in later releases. Blank topics are included as placeholders.]

Determines whether the specified Object is equal to the current Object.

Namespace:   System
Assembly:  mscorlib (in mscorlib.dll)
Public Overridable Function Equals ( _
	obj As Object _
) As Boolean
public virtual bool Equals(
	Object obj
virtual bool Equals(
	Object^ obj
abstract Equals : 
        obj:Object -> bool 
override Equals : 
        obj:Object -> bool 
public function Equals(
	obj : Object
) : boolean


Type: System..::..Object
The object to compare with the current object.

Return Value

Type: System..::..Boolean
true if the specified object is equal to the current object; otherwise, false.

The default implementation of Equals supports reference equality for reference types, and bitwise equality for value types. Reference equality means the object references that are compared refer to the same object. Bitwise equality means the objects that are compared have the same binary representation.

Note that a derived type might override the Equals method to implement value equality. Value equality means the compared objects have the same value even though they have different binary representations. For example, consider two Decimal objects that represent the numbers 1.10 and 1.1000. The Decimal objects do not have bitwise equality because they have different binary representations to account for the different number of trailing zeroes. However, the objects have value equality because the numbers 1.10 and 1.1000 are considered equal for comparison purposes since the trailing zeroes are insignificant.