This project has moved and is read-only. For the latest updates, please go here.

System.Collections.IEnumerable extension methods

Each(Action<object> action)

Summary: Performs the specified action on each element in the IEnumerable.
C# Example:
var combinedLength = 0;

var arr = new string[] {
    "Chris", "Steve", "John"

arr.Each(d => combinedLength += d.Length);
// combinedLength now equals 14


Summary: Returns a boolean indicating if the IEnumerable is Empty.
C# Example:
var arr = new string[0];

if (arr.IsEmpty()) {
    // do something

Last edited May 4, 2012 at 3:10 PM by crpietschmann, version 3


No comments yet.