List<T>.IList.Remove(Object) Method
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
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
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
Collaborate with us on GitHub
The source for this content can be found on GitHub, where you can also create and review issues and pull requests. For more information, see our contributor guide.