Table of Contents

Remove Method

Definition

Namespace
Cuemon.Extensions.Collections.Generic
Assemblies
Cuemon.Extensions.Collections.Generic.dll
Source
src/Cuemon.Extensions.Collections.Generic/ListExtensions.cs

Remove<T>(IList<T>, Func<T, bool>)

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

public static bool Remove<T>(this IList<T> list, Func<T, bool> predicate)

Parameters

list IList<T>

The IList<T> to extend.

predicate Func<T, bool>

The function delegate that defines the conditions of the element to remove.

Returns

bool

true if item was successfully removed from the list, false otherwise.

Type Parameters

T

The type of elements in the IList<T>.