Mono Class Library: System.Array Overview | MembersSystem.Array.IndexOf Method |
Searches the specified one-dimensional Array, returning the index of the first occurrence of the specified object in the specified range. [Edit]
|
A int containing the index of the first occurrence of value in array, within the range startIndex through startIndex + count- 1, if found; otherwise, array.GetLowerBound(0) - 1.Note: For a vector, if value is not found, the return value will be -1. This provides the caller with a standard code for the failed search.[Edit]
Type Reason ArgumentNullException array is null. [Edit] ArgumentOutOfRangeException startIndex is less than array.GetLowerBound(0).
-or-
count is less than zero.
-or-
startIndex + count is greater than array.GetLowerBound(0) + array.Length.
[Edit]RankException array has more than one dimension. [Edit]
The elements are compared using object.Equals(object). [Edit]
Namespace: System
Assembly: mscorlib (in mscorlib.dll)
Assembly Versions: 1.0.5000.0, 2.0.0.0