NGWS SDK Documentation  

This is preliminary documentation and subject to change.
To comment on this topic, please send us email at ngwssdk@microsoft.com. Thanks!

String.CompareOrdinal (String, String)

Compares two strings by an ordinal comparison.

[Visual Basic]
Overloads Public Shared Function CompareOrdinal( _
   ByVal strA As String, _
   ByVal strB As String _
) As Integer
[C#]
public static int CompareOrdinal(
   string strA,
   string strB
);
[C++]
public: static int CompareOrdinal(
   String* strA,
   String* strB
);
[JScript]
public static function CompareOrdinal(
   strA : String,
   strB : String
) : int;

Parameters

strA
The first string.
strB
The second string.

Return Value

Permission Description
A negative integer If the first string is less than the second string.
0 If the two strings are equal
A positive integer If the first string is greater than the second string.

Remarks

The CompareOrdinal method compares two specified strings and returns an integer representation of their relationship.

To compare strings under the rules of specified CultureInfo, use Compare or CompareTo

In the comparison of two string objects, a null string is considered less than a non-null string. If both strings are null, they are considered equal.

See Also

String Class | String Members | System Namespace | String.CompareOrdinal Overload List | Int32