IEqualityComparer.Equals Method
Collapse the table of content
Expand the table of content

EqualityComparer<T>.IEqualityComparer.Equals Method

[ This article is for Windows Phone 8 developers. If you’re developing for Windows 10, see the latest documentation. ]

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.

Windows Phone OS

Supported in: 8.1, 8.0, 7.1, 7.0

Windows Phone

Show:
© 2017 Microsoft