ArrayList.Remove Method

Removes the first occurrence of a specified object from the ArrayList collection.

Namespace: System.Collections
Assembly: mscorlib (in mscorlib.dll)

Syntax

public virtual void Remove (
         Object obj
)

Parameters

  • obj
    The object you want to remove from the ArrayList collection. This value can be a null reference.

Remarks

This method performs a linear search; therefore, the average execution time is proportional to the value of the Count property. In other words, this method is an O(n) operation, where n is the value of Count.

This method determines equality by calling the Object.Equals method.

Version Information

Available in the .NET Micro Framework versions 2.0, 2.5, 3.0, 4.0, 4.1, and 4.2.

See Also

Reference

ArrayList Class
ArrayList Members
System.Collections Namespace