Inequality 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 different values.
Namespace: System
Assembly: mscorlib (in mscorlib.dll)
Syntax
'Declaration
Public Shared Operator <> ( _
a As String, _
b As String _
) As Boolean
public static bool operator !=(
string a,
string b
)
public:
static bool operator !=(
String^ a,
String^ b
)
static let inline (<>)
a:string *
b:string : bool
JScript does not support overloaded operators.
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 different from the value of b; otherwise, false.
Remarks
The Inequality method defines the operation of the inequality 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.
.NET Framework Security
- Full trust for the immediate caller. This member cannot be used by partially trusted code. For more information, see dd66cd4c-b087-415f-9c3e-94e3a1835f74.