Mono Class Library: System.Collections.ArrayList Overview | Members

System.Collections.ArrayList.Contains Method

Determines whether the specified object is contained in the current instance.

public virtual bool Contains (object item)

Parameters

item
The object to locate in the current instance.

Returns

true if item is contained in the current instance; otherwise, false.

Remarks

Note: This method is implemented to support the IList interface.

Operation
As described above.

This method determines equality by calling the object.Equals(object) implementation of the type of item.

Note: For the default implementation, this method is an O(n) operation where n is equal to the ArrayList.Count of the current instance. If the current instance is sorted, it is more efficient to call ArrayList.BinarySearch(int, int, object, IComparer) method.

Requirements

Namespace: System.Collections
Assembly: mscorlib (in mscorlib.dll)
Assembly Versions: 1.0.5000.0, 2.0.0.0