Assembly: mscorlib (in mscorlib.dll)
'Declaration Private Function System.Collections.IList.IndexOf ( _ value As Object _ ) As Integer Implements IList.IndexOf 'Usage Dim instance As Array Dim value As Object Dim returnValue As Integer returnValue = CType(instance, IList).IndexOf(value)
J# supports the use of explicit interface implementations, but not the declaration of new ones.
JScript supports the use of explicit interface implementations, but not the declarations of new ones.
The object to locate in the current Array.
Return ValueThe index of the first occurrence of value within the entire Array, if found; otherwise, the lower bound of the Array minus 1.
The one-dimensional Array is searched forward starting at the first element and ending at the last element.
The elements are compared to the specified value using the Object.Equals method. If the element type is a nonintrinsic (user-defined) type, the Equals implementation of that type is used.
Since most arrays will have a lower bound of zero, this method would generally return –1 when value is not found. In the rare case that the lower bound of the array is equal to Int32.MinValue and value is not found, this method returns Int32.MaxValue, which is System.Int32.MinValue - 1.
This method is an O(n) operation, where n is Length.
Windows 98, Windows 2000 SP4, Windows CE, Windows Millennium Edition, Windows Mobile for Pocket PC, Windows Mobile for Smartphone, Windows Server 2003, Windows XP Media Center Edition, Windows XP Professional x64 Edition, Windows XP SP2, Windows XP Starter Edition
The .NET Framework does not support all versions of every platform. For a list of the supported versions, see System Requirements.