Class CollectionExtensions
Various class extensions for generic collections.
public static class CollectionExtensions
- Inheritance
-
CollectionExtensions
- Inherited Members
Methods
- AddElement<TKey, TValue, TCollection>(IDictionary<TKey, TCollection>, TKey, TValue)
Adds an element to a mutable lookup table
(E.g. Dictionary<Key,List<Value>>)
- AddRange<T>(IList<T>, IEnumerable<T>)
Adds a range of values to the specified IList.
- ContainsElement<TKey, TValue, TCollection>(IDictionary<TKey, TCollection>, TKey, TValue)
Queries if a certain value exists in a mutable lookup table
(E.g. Dictionary<Key,List<Value>>)
- InsertOrdered<T>(List<T>, T, IComparer<T>?)
Inserts an item into an already sorted list.
- RemoveElement<TKey, TValue, TCollection>(IDictionary<TKey, TCollection>, TKey, TValue)
Removes an element from a mutable lookup table
(E.g. Dictionary<Key,List<Value>>)
- SafeYield<T>(T?)
Wraps this object instance into an IEnumerable<T> consisting of a single item.
If the item is null, returns an empty enumerable instead.
- Yield<T>(T)
Wraps this object instance into an IEnumerable<T> consisting of a single item.