Table of Contents

ConditionalCollection<T> Class

Definition

Provides the abstract base class for a generic, conditional collection.

public abstract class ConditionalCollection<T> : ICollection<T>, IEnumerable<T>, IEnumerable

Type Parameters

T

The type of elements in the collection.

Inheritance
ConditionalCollection<T>
Implements

Constructors

Name Description
ConditionalCollection()

Initializes a new instance of the ConditionalCollection<T> class.

Properties

Name Description
Count

Gets the number of elements contained in the ConditionalCollection<T>.

IsReadOnly

Gets a value indicating whether the ConditionalCollection<T> is read-only.

Methods

Name Description
Add(T)

Adds an item to the ConditionalCollection<T>.

Add(T, Action)

Adds an item to the ConditionalCollection<T>.

Clear()

Removes all items from the ConditionalCollection<T>.

Contains(T)

Determines whether the ConditionalCollection<T> contains a specific value.

Contains(T, IEqualityComparer<T>)

Determines whether the ConditionalCollection<T> contains a specific value by using a specified comparer.

CopyTo(T[], int)

Copies the elements of the ConditionalCollection<T> to an Array, starting at a particular Array index.

GetEnumerator()

Returns an enumerator that iterates through the collection.

Remove(T)

Removes the first occurrence of a specific object from the 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.

See Also