Click or drag to resize
EnumerableExtensionMethods Methods

The EnumerableExtensionMethods type exposes the following members.

Methods
  NameDescription
Public methodStatic memberContainsAllT
Checks whether the first sequence contains all elements of the second one.
Public methodStatic memberIsNullOrEmpty(IEnumerable)
Determines whether the collection is null or contains no elements.
Public methodStatic memberIsNullOrEmptyT(IEnumerableT)
Determines whether the collection is null or contains no elements.
Public methodStatic memberRandomItemT
Returns a random item from the specified sequence.
Public methodStatic memberRandomItemOrDefaultT(IEnumerableT)
Returns a random item from the specified sequence or the default value of the specified type if the sequence is null or empty.
Public methodStatic memberRandomItemOrDefaultT(IEnumerableT, T)
Returns a random item from the specified sequence or the specified default value if the sequence is null or empty.
Public methodStatic memberRandomSelectT(IEnumerableT)
Selects a random item from the specified enumerable.
Public methodStatic memberRandomSelectT(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.
Public methodStatic memberRandomSelectT(IEnumerableT, Int32, ActionT)
Executes the specified action for the specified number of random items from the specified enumerable.
Public methodStatic memberRandomWeightedItemT
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
Top
See Also