Table of Contents

Class

Namespace
CoreFramework

Provides extension methods for working with enumerable sequences.

public static class EnumerableExtensions
Inheritance
object

Methods

ForEach<T>(IEnumerable<T>, Action<T>)

Performs an action on each element in the sequence.

public static void ForEach<T>(this IEnumerable<T> sequence, Action<T> action)

Parameters

sequence IEnumerable<T>

The sequence to iterate over.

action Action<T>

The action to perform on each element.

Type Parameters

T

The type of elements in the sequence.

Random<T>(IEnumerable<T>)

Returns a random element from the sequence.

public static T Random<T>(this IEnumerable<T> sequence)

Parameters

sequence IEnumerable<T>

The sequence to select the random element from.

Returns

T

A random element from the sequence.

Type Parameters

T

The type of elements in the sequence.