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.IndexOf (Char[], Int32, Int32)

Returns the index of the first occurrence of any character in value in the current instance.

[Visual Basic]
Overloads Public Function IndexOf( _
   ByVal value() As Char, _
   ByVal startIndex As Integer, _
   ByVal endIndex As Integer _
) As Integer
[C#]
public int IndexOf(
   char[] value,
   int startIndex,
   int endIndex
);
[C++]
public: int IndexOf(
   __wchar_t* value[],
   int startIndex,
   int endIndex
);
[JScript]
public function IndexOf(
   value : Char[],
   startIndex : int,
   endIndex : int
) : int;

Parameters

value
A character array containing all of the characters to search for.
startIndex
The position in the current instance to start searching.
endIndex
The position in the current instance to stop searching.

Return Value

Value Condition
The index in the string If the character is found.
-1 If the character is not found.

Exceptions

Exception Type Condition
ArgumentNullException If the character is null.
ArgumentOutOfRangeException If beginning position or the end position is less than zero or greater than the length of the string.
ArgumentOutOfRangeException If the end position is less than the beginning position.

Remarks

The IndexOf method searches for a specified character array at a specified position and returns the index. The search starts at the beginning position (startIndex) and runs to the end position (endIndex-1 (startIndex, endIndex)). The search is case-sensitive. The character at the position of endIndex is not included in the search.

See Also

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