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.

StringComparer::Equals Method (Object^, Object^)

 

When overridden in a derived class, indicates whether two objects are equal.

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

public:
virtual bool Equals(
	Object^ x,
	Object^ y
) sealed

Parameters

x
Type: System::Object^

An object to compare to y.

y
Type: System::Object^

An object to compare to x.

Return Value

Type: System::Boolean

true if x and y refer to the same object, or x and y are both the same type of object and those objects are equal, or both x and y are null; otherwise, false.

Because the runtime does not have to unbox x or y if they are value types or attempt to downcast x or y to strings if they are reference types, the Equals(String^, String^) method may be slightly more efficient than the Equals(Object^, Object^) method.

.NET Framework
Available since 2.0
Silverlight
Available since 2.0
Windows Phone Silverlight
Available since 7.0
Return to top
Show:
© 2017 Microsoft