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!

Array.IndexOf (Array, Object, Int32)

Searches the one-dimensional Array for a specific value, starting at the specified index and ending at the last element.

[Visual Basic]
Overloads Public Shared Function IndexOf( _
   ByVal array As Array, _
   ByVal value As Object, _
   ByVal startIndex As Integer _
) As Integer
[C#]
public static int IndexOf(
   Array array,
   object value,
   int startIndex
);
[C++]
public: static int IndexOf(
   Array* array,
   Object* value,
   int startIndex
);
[JScript]
public static function IndexOf(
   array : Array,
   value : Object,
   startIndex : int
) : int;

Parameters

array
The one-dimensional Array to search.
value
The Object to locate in array.
startIndex
The starting index of the search.

Return Value

The index of the first occurrence of value in the range startIndex through the last element, or-1 if value does not occur in that range.

Exceptions

Exception Type Condition
ArgumentNullException array is a null reference (in Visual Basic Nothing).
ArgumentOutOfRangeException startIndex is outside the range of valid indices for array.

Remarks

The Array is searched forwards, starting at startIndex and ending at the last element, and the elements are compared to the specified value using the Equals method.

See Also

Array Class | Array Members | System Namespace | Array.IndexOf Overload List | LastIndexOf