Collation.AreEqual MethodCollation.AreEqual MethodCollation::AreEqual Method

Compares two specified stringStringString values for equality under this collation.

Syntax

Public Overridable Function AreEqual( _
    value1 As String, _
    value2 As String _
) As Boolean
public virtual bool AreEqual(
    string value1,
    string value2
)
public:
virtual bool AreEqual(
    String^ value1, 
    String^ value2
)
 

Parameters

value1

Type: System.StringSystem.StringSystem::String^

The first stringStringString to compare.

value2

Type: System.StringSystem.StringSystem::String^

The second stringStringString to compare.

Return Value

Type: System.BooleanSystem.BooleanSystem::Boolean

trueTruetrue if the two strings are equal; otherwise falseFalsefalse.

Exceptions

ExceptionCondition
ArgumentNullExceptionArgumentNullExceptionArgumentNullException value1 or value2 is null a null reference (Nothing in Visual Basic) nullptr.

Remarks

This method implements the equality and inequality operators under this collation, and should follow the same semantics.

The default implementation calls the CompareCompareCompare method and compares the result with 0.