CodeVerge.Net Beta


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


Compares substrings of two specified String objects.

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

Syntax

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

Parameters

strA
Type: System..::.String
The first String.
indexA
Type: System..::.Int32
The position of the substring within strA.
strB
Type: System..::.String
The second String.
indexB
Type: System..::.Int32
The position of the substring within 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.Value Condition 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