CodeVerge.Net Beta


   Explore    Item Entry   Register  Login  
Microsoft News
Asp.Net Forums
IBM Software
Borland Forums
Adobe Forums
Novell Forums


Compares substrings of two specified String objects by evaluating the numeric values of the corresponding Char objects in each substring.

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

Syntax

Visual Basic (Declaration)
Public Shared Function CompareOrdinal ( _
	strA As String, _
	indexA As Integer, _
	strB As String, _
	indexB As Integer, _
	length As Integer _
) As Integer
C#
public static int CompareOrdinal(
	string strA,
	int indexA,
	string strB,
	int indexB,
	int length
)
Visual C++
public:
static int CompareOrdinal(
	String^ strA, 
	int indexA, 
	String^ strB, 
	int indexB, 
	int length
)
JavaScript
System.String.compareOrdinal = function(strA, indexA, strB, indexB, length);

Parameters

strA
Type: System..::.String
The first String.
indexA
Type: System..::.Int32
The starting index of the substring in strA.
strB
Type: System..::.String
The second String.
indexB
Type: System..::.Int32
The starting index of the substring in strB.
length
Type: System..::.Int32
The maximum number of characters in the substrings to compare.

Return Value

A 32-bit signed integer indicating the lexical relationship between the two comparands.ValueCondition Less than zero The substring in strA is less than the substring in strB. Zero The substrings are equal, or length is zero. Greater than zero The substring in strA is greater than the substring in strB.

Exceptions

ExceptionCondition
System..::.ArgumentOutOfRangeExceptionindexA is greater than strA. Length.-or- indexB is greater than strB. Length.-or- indexA, indexB, or length is negative.

See Also



Free Download:
   
  Privacy | Contact Us
All Times Are GMT