IList.Contains Method

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.

Namespace:  System
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.

Return Value

Type: System.Boolean
true if value is found in the Array; otherwise, false.

Implements

IList.Contains(Object)

ExceptionCondition
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.

Windows Phone OS

Supported in: 8.1, 8.0, 7.1, 7.0

Windows Phone

Show:
© 2017 Microsoft