Table of Contents

Remove Method

Definition

Remove(T)

Removes the first occurrence of a specific object from the ConditionalCollection<T>.

public abstract bool Remove(T item)

Parameters

item T

The object to remove from the ConditionalCollection<T>.

Returns

bool

true if item was successfully removed from the ConditionalCollection<T>; otherwise, false. This method also returns false if item is not found in the original ConditionalCollection<T>.

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

Removes all occurrences of a specific object from the ConditionalCollection<T> that match the conditions defined by the specified predicate and comparer.

protected bool Remove(T item, Func<T, bool> predicate, IEqualityComparer<T> comparer = null)

Parameters

item T

The object to remove from the ConditionalCollection<T>.

predicate Func<T, bool>

The function delegate that will iterate and match the specified item from the ConditionalCollection<T>.

comparer IEqualityComparer<T>

The IEqualityComparer<T> implementation to use when comparing the specified item with an element from the ConditionalCollection<T>.

Returns

bool

true if item was successfully removed from the ConditionalCollection<T>; otherwise, false. This method also returns false if item is not found in the original ConditionalCollection<T>.