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.

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

 

Determines whether the specified Object instances are considered equal.

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

public:
static bool Equals(
	Object^ o1,
	Object^ o2
)

Parameters

o1
Type: System::Object^

The first object to compare.

o2
Type: System::Object^

The second object to compare.

Return Value

Type: System::Boolean

true if the o1 parameter is the same instance as the o2 parameter, or if both are null, or if o1.Equals(o2) returns true; otherwise, false.

This method is used by compilers.

The following example demonstrates how to compare two objects by using the Equals method.

No code example is currently available or this language may not be supported.

.NET Framework
Available since 1.1
Return to top
Show:
© 2017 Microsoft