Click or drag to resize
EnumerableEx Class
Provides an additional set of static methods for querying objects that implement System.Collections.Generic.IEnumerable<T>.
Inheritance Hierarchy
SystemObject
  DW.SharpToolsEnumerableEx

Namespace: DW.SharpTools
Assembly: DW.SharpTools (in DW.SharpTools.dll) Version: 2.4.0.0 (2.4.0.0)
Syntax
C#
public static class EnumerableEx

The EnumerableEx type exposes the following members.

Methods
Examples
C#
public void Repeat()
{
    var items = new List<int>();
    var i = 0;
    items.AddRange(EnumerableEx.Repeat(() => (i++) * 3, 13));
}

public void ForEach(IEnumerable<string> elements)
{
    elements.ForEach(e => Console.WriteLine(e));
}

public void Shuffle()
{
    var items = new List<int> { 1, 2, 3 };
    items = items.Shuffle().ToList();
}
See Also