Table of Contents

Interface ICollectionEx<T>

Namespace
Ecng.Collections
Assembly
Ecng.Collections.dll

Provides an extended set of methods and events for collections of a specified type.

public interface ICollectionEx<T> : ICollection<T>, IEnumerable<T>, IEnumerable

Type Parameters

T

The type of elements in the collection.

Inherited Members
Extension Methods

Methods

AddRange(IEnumerable<T>)

Adds a range of elements to the collection.

void AddRange(IEnumerable<T> items)

Parameters

items IEnumerable<T>

The elements to add.

RemoveRange(IEnumerable<T>)

Removes a range of elements from the collection.

void RemoveRange(IEnumerable<T> items)

Parameters

items IEnumerable<T>

The elements to remove.

RemoveRange(int, int)

Removes a specified number of elements starting at a certain index.

int RemoveRange(int index, int count)

Parameters

index int

The starting index.

count int

The number of elements to remove.

Returns

int

The number of removed elements.

Events

AddedRange

Occurs when a range of elements is added.

event Action<IEnumerable<T>> AddedRange

Event Type

Action<IEnumerable<T>>

RemovedRange

Occurs when a range of elements is removed.

event Action<IEnumerable<T>> RemovedRange

Event Type

Action<IEnumerable<T>>