Επεξεργασία

Κοινή χρήση μέσω


List<T>.IList.Remove(Object) Method

Definition

Removes the first occurrence of a specific object from the IList.

 virtual void System.Collections.IList.Remove(System::Object ^ item) = System::Collections::IList::Remove;
void IList.Remove (object item);
abstract member System.Collections.IList.Remove : obj -> unit
override this.System.Collections.IList.Remove : obj -> unit
Sub Remove (item As Object) Implements IList.Remove

Parameters

item
Object

The object to remove from the IList.

Implements

Exceptions

item is of a type that is not assignable to the IList.

Remarks

This method determines equality using the default equality comparer EqualityComparer<T>.Default for T, the type of values in the list.

This method performs a linear search; therefore, this method is an O(n) operation, where n is Count.

Applies to