asp.net.ph

String.CompareOrdinal Method ( String, String )

System Namespace   String Class


Compares two specified String objects, without considering the local national language or culture.

[ VB ]
<Serializable>
Overloads Public Shared Function CompareOrdinal ( _
   ByVal strA As String, _
   ByVal strB As String _
) As Integer

[ C# ]
[ Serializable ]
public static int CompareOrdinal (
   string strA,
   string strB
);

[ C++ ]
[ Serializable ]
public: static int CompareOrdinal (
   String* strA,
   String* strB
);

[ JScript ]
public Serializable
static function CompareOrdinal (
   strA : String,
   strB : String
) : int;

Parameters

strA
The first String.
strB
The second String.

Return Value

An integer indicating the lexical relationship between the two comparands.

Permission Description
Less than zero strA is less than strB.
Zero strA and strB are equal.
Greater than zero strA is greater than strB.

Remarks

By definition, any String, including the empty string, compares greater than a null reference ( Nothing in Visual Basic ); and two null references compare equal to each other.

See Also

String Members   String.CompareOrdinal Overload List   Int32   Compare   CompareTo Skip Navigation Links




Home
Suggested Reading


Previous page Back to top Next page

© 2000-2010 Rey Nuñez All rights reserved.

If you have any question, comment or suggestion
about this site, please send us a note

You can help support asp.net.ph