![]() | EnumerableExtensionMethods Methods |
The EnumerableExtensionMethods type exposes the following members.
Name | Description | |
---|---|---|
![]() ![]() | ContainsAllT |
Checks whether the first sequence contains all elements of the second one.
|
![]() ![]() | IsNullOrEmpty(IEnumerable) |
Determines whether the collection is null or contains no elements.
|
![]() ![]() | IsNullOrEmptyT(IEnumerableT) |
Determines whether the collection is null or contains no elements.
|
![]() ![]() | RandomItemT |
Returns a random item from the specified sequence.
|
![]() ![]() | RandomItemOrDefaultT(IEnumerableT) |
Returns a random item from the specified sequence or the default value of the
specified type if the sequence is null or empty.
|
![]() ![]() | RandomItemOrDefaultT(IEnumerableT, T) |
Returns a random item from the specified sequence or the specified default value if
the sequence is null or empty.
|
![]() ![]() | RandomSelectT(IEnumerableT) |
Selects a random item from the specified enumerable.
|
![]() ![]() | RandomSelectT(IEnumerableT, Int32) |
Selects the specified number of random items from the specified enumerable.
If the number of items in the enumerable is smaller than the specified number of selections,
the enumerable itself is returned.
|
![]() ![]() | RandomSelectT(IEnumerableT, Int32, ActionT) |
Executes the specified action for the specified number of random items from the specified enumerable.
|
![]() ![]() | RandomWeightedItemT |
Returns a random weighted item from the specified sequence.
Uses the specified function to get the weight of an item.
Idea was taken from http://stackoverflow.com/questions/17912005/quick-way-of-selecting-a-random-item-from-a-list-with-varying-probabilities-ba
|