EqualityComparer<T>.IEqualityComparer.Equals Method

Determines whether the specified objects are equal.

Namespace:  System.Collections.Generic
Assembly:  mscorlib (in mscorlib.dll)

bool IEqualityComparer.Equals(
	Object x,
	Object y
)

Parameters

x
Type: System.Object
The first object to compare.
y
Type: System.Object
The second object to compare.

Return Value

Type: System.Boolean
true if the specified objects are equal; otherwise, false.

Implements

IEqualityComparer.Equals(Object, Object)

ExceptionCondition
ArgumentException

x or y is of a type that cannot be cast to type T.

This method is a wrapper for the Equals(T, T) method, so obj must be cast to the type specified by the generic argument T of the current instance. If it cannot be cast to T, an ArgumentException is thrown.

Comparing null is allowed and does not generate an exception.

Silverlight

Supported in: 5, 4, 3

Silverlight for Windows Phone

Supported in: Windows Phone OS 7.1, Windows Phone OS 7.0

XNA Framework

Supported in: Xbox 360, Windows Phone OS 7.0

For a list of the operating systems and browsers that are supported by Silverlight, see Supported Operating Systems and Browsers.

Community Additions

ADD
Show: