Windows apps
Collapse the table of content
Expand the table of content
Information
The topic you requested is included in another documentation set. For convenience, it's displayed below. Choose Switch to see the topic in its original location.

EqualityComparer<T>::IEqualityComparer::Equals Method (Object^, Object^)

 

Determines whether the specified objects are equal.

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

private:
virtual bool Equals(
	Object^ x,
	Object^ y
) sealed = IEqualityComparer::Equals

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.

Exception Condition
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.

Universal Windows Platform
Available since 8
.NET Framework
Available since 2.0
Portable Class Library
Supported in: portable .NET platforms
Silverlight
Available since 2.0
Windows Phone Silverlight
Available since 7.0
Windows Phone
Available since 8.1
Return to top
Show:
© 2017 Microsoft