Table of Contents

Class CollectionExtensions

Namespace
ChartTools.Extensions.Linq
Assembly
ChartTools.dll
public static class CollectionExtensions
Inheritance
CollectionExtensions
Inherited Members

Methods

BinarySearchIndex<T>(IList<T>, T, out bool)

public static int BinarySearchIndex<T>(this IList<T> source, T target, out bool exactMatch) where T : notnull, IComparable<T>

Parameters

source IList<T>
target T
exactMatch bool

Returns

int

Type Parameters

T

BinarySearchIndex<T, TKey>(IList<T>, TKey, Func<T, TKey>, out bool)

public static int BinarySearchIndex<T, TKey>(this IList<T> source, TKey target, Func<T, TKey> keySelector, out bool exactMatch) where TKey : notnull, IComparable<TKey>

Parameters

source IList<T>
target TKey
keySelector Func<T, TKey>
exactMatch bool

Returns

int

Type Parameters

T
TKey

RemoveWhere<T>(ICollection<T>, Predicate<T>)

Removes all items in a ICollection<T> that meet a condition

public static void RemoveWhere<T>(this ICollection<T> source, Predicate<T> predicate)

Parameters

source ICollection<T>

Collection to remove items from

predicate Predicate<T>

Function that determines which items to remove

Type Parameters

T