Equality Operator

[This documentation is for preview only, and is subject to change in later releases. Blank topics are included as placeholders.]

Determines whether two specified strings have the same value.

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

static let inline (=)
        a:string * 
        b:string  : bool

Parameters

a
Type: System..::..String
The first string to compare, or nullNothingnullptrunita null reference (Nothing in Visual Basic).
b
Type: System..::..String
The second string to compare, or nullNothingnullptrunita null reference (Nothing in Visual Basic).

Return Value

Type: System..::..Boolean
true if the value of a is the same as the value of b; otherwise, false.

The Equality method defines the operation of the equality operator for the String class.

This operator is implemented using the Equals method, which means the comparands are tested for a combination of reference and value equality. This operator performs an ordinal comparison.

Show: