Array.IList.Contains Method
[ This article is for Windows Phone 8 developers. If you’re developing for Windows 10, see the latest documentation. ]
Determines whether an element is in the Array.
Assembly: mscorlib (in mscorlib.dll)
'Declaration Private Function Contains ( _ value As Object _ ) As Boolean Implements IList.Contains
Parameters
- value
- Type: System.Object
The object to locate in the Array. The element to locate can be Nothing for reference types.
Implements
IList.Contains(Object)| Exception | Condition |
|---|---|
| RankException | The current Array is multidimensional. |
This method performs a linear search; therefore, this method is an O(n) operation, where n is ICollection.Count.
This method determines equality by calling the Object.Equals method.
This method is an O(n) operation, where n is Length.
Show: