Mono Class Library: System.Collections.Generic.List<T> Overview | Members

System.Collections.Generic.List<T>.Remove Method

Removes the first occurrence of the specified object from the list.

public bool Remove (T item)

Parameters

item
The object to be removed from the list.

Returns

true if item is successfully removed; otherwise, false.

Remarks

This method uses the default equality comparer for type T to determine equality of list elements. The default equality comparer for element type T is defined in the Description section of this (class .) specification.

This method is an O(n) operation, where n is List<T>.Count.

Requirements

Namespace: System.Collections.Generic
Assembly: mscorlib (in mscorlib.dll)
Assembly Versions: 2.0.0.0
Since: .NET 2.0