System.StringComparer.Equals Method

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

Syntax

public abstract bool Equals (string x, string y)

Parameters

x
A string to compare to y.
y
A string to compare to x.

Returns

true if x and y refer to the same object, or x and y are equal; otherwise, false.

Remarks

The StringComparer.Equals(string, string) method is more efficient than the StringComparer.Equals(object, object) method because the x and y parameters do not have to be unboxed to perform the comparison.

Requirements

Namespace: System
Assembly: mscorlib (in mscorlib.dll)
Assembly Versions: 2.0.0.0, 4.0.0.0
Since: .NET 2.0