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!

CompareInfo.Compare (String, String, CompareOptions)

Compares two strings using the specified flags.

[Visual Basic]
Overloads Overridable Public Function Compare( _
   ByVal string1 As String, _
   ByVal string2 As String, _
   ByVal options As CompareOptions _
) As Integer
[C#]
public virtual int Compare(
   string string1,
   string string2,
   CompareOptions options
);
[C++]
public: virtual int Compare(
   String* string1,
   String* string2,
   CompareOptions options
);
[JScript]
public function Compare(
   string1 : String,
   string2 : String,
   options : CompareOptions
) : int;

Parameters

string1
The first string to be compared.
string2
The second string to be compared.
options
The specified flags are the following data members: IgnoreCase, IgnoreKanaType, IgnoreNonSpace, IgnoreSymbols, IgnoreWidth, and StringSort.

Return Value

Value Condition
0 The two strings are equal.
Less than 0 The first string is less than the second string.
Greater than 0 The first string is greater than the second string.

See Also

CompareInfo Class | CompareInfo Members | System.Globalization Namespace | CompareInfo.Compare Overload List