//The MIT License (MIT)
//http://arolibraries.codeplex.com/license
using System;
using System.Collections;
using System.Collections.Generic;
using System.Data;
using System.Linq;
using System.Reflection;
using System.Text;
using System.Threading;
namespace AroLibraries.ExtensionMethods.Enumerable
{
public static class IEnumerableExt
{
public static T Ext_Aggregate(this IEnumerable list, Func aggregateFunction)
{
return Ext_Aggregate(list, default(T), aggregateFunction);
}
public static T Ext_Aggregate(this IEnumerable list, T defaultValue, Func aggregateFunction)
{
return list.Count() <= 0 ?
defaultValue : list.Aggregate(aggregateFunction);
}
}
}