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)

Searches the entire one-dimensional Array for a specific value.

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

Parameters

array
The one-dimensional Array to search.
value
The Object to locate in array.

Return Value

The index of the first occurrence of value in the entire one-dimensional array, or-1 if value does not occur in array.

Exceptions

Exception Type Condition
ArgumentNullException array is a null reference (in Visual Basic Nothing).

Remarks

The Array is searched forwards, 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