Partager via


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 (
         Objectobj
)

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, and 4.1.

See Also

Reference

ArrayList Class
ArrayList Members
System.Collections Namespace