19 lines
446 B
C#
19 lines
446 B
C#
namespace Pilz.Extensions.Collections;
|
|
|
|
public static class IEnumerableExtensions
|
|
{
|
|
public static IEnumerable<T> ForEach<T>(this IEnumerable<T> @this, Action<T> action)
|
|
{
|
|
foreach (var t in @this)
|
|
action(t);
|
|
return @this;
|
|
}
|
|
|
|
public static IQueryable<T> ForEach<T>(this IQueryable<T> @this, Action<T> action)
|
|
{
|
|
foreach (var t in @this)
|
|
action(t);
|
|
return @this;
|
|
}
|
|
}
|