Click or drag to resize

CollectionExtensions Methods

The CollectionExtensions type exposes the following members.

Methods
  Name Description
Public Extension Method AddOrUpdateTKey, TValue(IDictionaryTKey, TValue, TKey, TValue) Adds a key/value pair to the IDictionaryTKey, TValue if the key does not already exist, or updates a key/value pair in the IDictionaryTKey, TValue if the key already exists.
Public Extension Method AddOrUpdateTKey, TValue(IDictionaryTKey, TValue, TKey, FuncTKey, TValue) Adds a key/value pair to the IDictionaryTKey, TValue if the key does not already exist, or updates a key/value pair in the IDictionaryTKey, TValue if the key already exists.
Public Extension Method AddOrUpdateTKey, TValue(IDictionaryTKey, TValue, TKey, TValue, FuncTKey, TValue, TValue) Adds a key/value pair to the IDictionaryTKey, TValue if the key does not already exist, or updates a key/value pair in the IDictionaryTKey, TValue if the key already exists.
Public Extension Method AddOrUpdateTKey, TValue(IDictionaryTKey, TValue, TKey, FuncTKey, TValue, FuncTKey, TValue, TValue) Adds a key/value pair to the IDictionaryTKey, TValue if the key does not already exist, or updates a key/value pair in the IDictionaryTKey, TValue if the key already exists.
Public Extension Method AddRangeT Adds the specified items to the collection.
Public Extension Method All Returns true if all items in BitArray are equal to value.
Public Extension Method AllParallelTSource Determines whether all elements of a sequence satisfy a condition with each item being tested in parallel.
Public Extension Method Any Returns true if any item in BitArray is equal to value.
Public Extension Method CompareToTSource Compares two arrays.
Public Extension Method CopyT Returns a copy of the Array.
Public Extension Method DistinctByTSource, TKey Returns only the elements whose keys are distinct.
Public Extension Method GetColumnT Gets a column of data out of a 2-dimensional array.
Public Extension Method GetOrAddTKey, TValue(IDictionaryTKey, TValue, TKey, TValue) Adds a key/value pair to the IDictionaryTKey, TValue if the key does not already exist.
Public Extension Method GetOrAddTKey, TValue(IDictionaryTKey, TValue, TKey, FuncTKey, TValue) Adds a key/value pair to the IDictionaryTKey, TValue if the key does not already exist.
Public Extension Method GetOrDefaultTKey, TValue(IDictionaryTKey, TValue, TKey) Attempts to get the value for the given key and returns the default value instead if the key does not exist in the IDictionaryTKey, TValue.
Public Extension Method GetOrDefaultTKey, TValue(IDictionaryTKey, TValue, TKey, FuncTKey, TValue) Attempts to get the value for the given key and returns the default value instead if the key does not exist in the IDictionaryTKey, TValue.
Public Extension Method GetRangeT Returns elements in the specified range from the collection.
Public Extension Method GetRowT Gets a row of data out of a 2-dimensional array.
Public Extension Method IndexOfT Returns the index of the first element of the sequence that satisfies a condition or -1 if no such element is found.
Public Extension Method LoadDelimitedStringTSource(IListTSource, String, FuncString, TSource) Appends items parsed from delimited string, created with ToDelimitedString, using the default delimiter ("|") into the given list.
Public Extension Method LoadDelimitedStringTSource(IListTSource, String, Char, FuncString, TSource) Appends items parsed from delimited string, created with ToDelimitedString, into the given list.
Public Extension Method LoadDelimitedStringTSource(IListTSource, String, String, FuncString, TSource) Appends items parsed from delimited string, created with ToDelimitedString, into the given list.
Public Extension Method MajorityT(IEnumerableT, Boolean, IEqualityComparerT) Returns the majority value in the collection, or default type value if no item represents the majority.
Public Extension Method MajorityT(IEnumerableT, T, Boolean, IEqualityComparerT) Returns the majority value in the collection, or defaultValue if no item represents the majority.
Public Extension Method MajorityByTSource, TKey(IEnumerableTSource, FuncTSource, TKey, Boolean, IEqualityComparerTKey) Returns the majority value in the collection, or default type value if no item represents the majority.
Public Extension Method MajorityByTSource, TKey(IEnumerableTSource, TSource, FuncTSource, TKey, Boolean, IEqualityComparerTKey) Returns the majority value in the collection, or defaultValue if no item represents the majority.
Public Extension Method MaxTSource(IEnumerableTSource, IComparerTSource) Returns the largest item from the enumeration.
Public Extension Method MaxTSource(IEnumerableTSource, FuncTSource, TSource, Int32) Returns the largest item from the enumeration.
Public Extension Method MaxByTSource, TKey Selects the largest item from the enumeration.
Public Extension Method MedianT Gets the median item(s) from an enumeration, i.e., one return item for odd lengths, two for even lengths.
Public Extension Method MergeT, TKey, TValue(T, IDictionaryTKey, TValue) Merges elements of multiple dictionaries into a single dictionary with no duplicate key values overwritten.
Public Extension Method MergeT, TKey, TValue(T, Boolean, IDictionaryTKey, TValue) Merges elements of multiple dictionaries into a single dictionary.
Public Extension Method MinTSource(IEnumerableTSource, IComparerTSource) Returns the smallest item from the enumeration.
Public Extension Method MinTSource(IEnumerableTSource, FuncTSource, TSource, Int32) Returns the smallest item from the enumeration.
Public Extension Method MinByTSource, TKey Selects the smallest item from the enumeration.
Public Extension Method MinorityT(IEnumerableT, Boolean, IEqualityComparerT) Returns the minority value in the collection, or default type value if no item represents the minority.
Public Extension Method MinorityT(IEnumerableT, T, Boolean, IEqualityComparerT) Returns the minority value in the collection, or defaultValue if no item represents the minority.
Public Extension Method MinorityByTSource, TKey(IEnumerableTSource, FuncTSource, TKey, Boolean, IEqualityComparerTKey) Returns the minority value in the collection, or default type value if no item represents the majority.
Public Extension Method MinorityByTSource, TKey(IEnumerableTSource, TSource, FuncTSource, TKey, Boolean, IEqualityComparerTKey) Returns the minority value in the collection, or defaultValue if no item represents the majority.
Public Extension Method ScrambleTSource(IListTSource) Rearranges all the elements in the list into a highly-random order.
Public Extension Method ScrambleTSource(IListTSource, Int32) Rearranges all the elements in the list into a repeatable pseudo-random order.
Public Extension Method ToDelimitedStringTSource(IEnumerableTSource) Converts an enumeration to a string, using the default delimiter ("|") that can later be converted back to a list using LoadDelimitedString.
Public Extension Method ToDelimitedStringTSource(IEnumerableTSource, Char) Converts an enumeration to a string that can later be converted back to a list using LoadDelimitedString.
Public Extension Method ToDelimitedStringTSource(IEnumerableTSource, String) Converts an enumeration to a string that can later be converted back to a list using LoadDelimitedString.
Public Extension Method ToDictionary Converts a name/value collection to a dictionary.
Public Extension Method ToPagedListT Gets a PagedListT to paginate source enumeration for a given page and specified pageSize.
Public Extension Method UnscrambleTSource Rearranges all the elements in the list previously scrambled with ScrambleTSource(IListTSource, Int32) back into their original order.
Public Extension Method UpdateRangeT Updates collection starting at the index with the specified items.
Top
See Also