KGy SOFT

EnumerableExtensions Class

KGy SOFT Core Libraries Help
Inheritance Hierarchy

SystemObject
  KGySoft.CoreLibrariesEnumerableExtensions

Namespace:  KGySoft.CoreLibraries
Assembly:  KGySoft.CoreLibraries (in KGySoft.CoreLibraries.dll) Version: 5.0.0-rc.1
Syntax

public static class EnumerableExtensions

The EnumerableExtensions type exposes the following members.

Methods

  NameDescription
Public methodStatic memberForEachT
Similarly to the List<T>.ForEach method, processes an action on each element of an enumerable collection.
Public methodStatic memberGetRandomElementT(IEnumerableT, Boolean)
Gets a random element from the enumerable source using a new Random instance.
Public methodStatic memberGetRandomElementT(IEnumerableT, Random, Boolean)
Gets a random element from the enumerable source using a specified Random instance.
Public methodStatic memberIndexOf(IEnumerable, FuncObject, Boolean)
Searches for an element in the source enumeration where the specified predicate returns .
Public methodStatic memberIndexOf(IEnumerable, Object)
Searches for an element in the source enumeration.
Public methodStatic memberIndexOfT(IEnumerableT, FuncT, Boolean)
Searches for an element in the source enumeration where the specified predicate returns .
Public methodStatic memberIndexOfT(IEnumerableT, T)
Searches for an element in the source enumeration.
Public methodStatic memberIsNullOrEmpty(IEnumerable)
Determines whether the specified source is  or empty (has no elements).
Public methodStatic memberIsNullOrEmptyT(IEnumerableT)
Determines whether the specified source is  or empty (has no elements).
Public methodStatic memberShuffleT(IEnumerableT)
Shuffles an enumerable source (randomizes its elements) using a new Random instance.
Public methodStatic memberShuffleT(IEnumerableT, Int32)
Shuffles an enumerable source (randomizes its elements) using the provided seed with a new Random instance.
Public methodStatic memberShuffleT(IEnumerableT, Random)
Shuffles an enumerable source (randomizes its elements) using a specified Random instance.
Public methodStatic memberToCircularListT
Public methodStatic memberTryAdd(IEnumerable, Object, Boolean, Boolean)
Tries to add the specified item to the collection.
Public methodStatic memberTryAddT(IEnumerableT, T, Boolean, Boolean)
Tries to add the specified item to the collection.
Public methodStatic memberTryAddRange(IEnumerable, IEnumerable, Boolean, Boolean)
Tries to add the specified collection to the target collection.
Public methodStatic memberTryAddRangeT(IEnumerableT, IEnumerableT, Boolean, Boolean)
Tries to add the specified collection to the target collection.
Public methodStatic memberTryClear(IEnumerable, Boolean, Boolean)
Tries to remove all elements from the collection.
Public methodStatic memberTryClearT(IEnumerableT, Boolean, Boolean)
Tries to remove all elements from the collection.
Public methodStatic memberTryGetElementAt(IEnumerable, Int32, Object, Boolean, Boolean)
Tries to get an item at the specified index in the collection.
Public methodStatic memberTryGetElementAtT(IEnumerableT, Int32, T, Boolean, Boolean)
Tries to get an item at the specified index in the collection.
Public methodStatic memberTryInsert(IEnumerable, Int32, Object, Boolean, Boolean)
Tries to insert the specified item at the specified index to the collection.
Public methodStatic memberTryInsertT(IEnumerableT, Int32, T, Boolean, Boolean)
Tries to insert the specified item at the specified index to the collection.
Public methodStatic memberTryInsertRange(IEnumerable, Int32, IEnumerable, Boolean, Boolean)
Tries to insert the specified collection into the target collection.
Public methodStatic memberTryInsertRangeT(IEnumerableT, Int32, IEnumerableT, Boolean, Boolean)
Tries to insert the specified collection into the target collection.
Public methodStatic memberTryRemove(IEnumerable, Object, Boolean, Boolean)
Tries to remove the specified item from to the collection.
Public methodStatic memberTryRemoveT(IEnumerableT, T, Boolean, Boolean)
Tries to remove the specified item from to the collection.
Public methodStatic memberTryRemoveAt(IEnumerable, Int32, Boolean, Boolean)
Tries to remove an item at the specified index from the collection.
Public methodStatic memberTryRemoveAtT(IEnumerableT, Int32, Boolean, Boolean)
Tries to remove an item at the specified index from the collection.
Public methodStatic memberTryRemoveRange(IEnumerable, Int32, Int32, Boolean, Boolean)
Tries to remove count amount of items from the specified collection at the specified index.
Public methodStatic memberTryRemoveRangeT(IEnumerableT, Int32, Int32, Boolean, Boolean)
Tries to remove count amount of items from the specified collection at the specified index.
Public methodStatic memberTryReplaceRange(IEnumerable, Int32, Int32, IEnumerable, Boolean, Boolean)
Tries to remove count amount of items from the target at the specified index, and to insert the specified collection at the same position. The number of elements in collection can be different from the amount of removed items.
Public methodStatic memberTryReplaceRangeT(IEnumerableT, Int32, Int32, IEnumerableT, Boolean, Boolean)
Tries to remove count amount of items from the target at the specified index, and to insert the specified collection at the same position. The number of elements in collection can be different from the amount of removed items.
Public methodStatic memberTrySetElementAt(IEnumerable, Int32, Object, Boolean, Boolean)
Tries to set the specified item at the specified index in the collection.
Public methodStatic memberTrySetElementAtT(IEnumerableT, Int32, T, Boolean, Boolean)
Tries to set the specified item at the specified index in the collection.
Top
See Also

Reference