response collection on ForEach

This commit is contained in:
Pilzinsel64
2025-06-27 10:47:28 +02:00
parent e2cfdb37e7
commit bc590923ad
2 changed files with 10 additions and 2 deletions

View File

@@ -2,9 +2,17 @@
public static class IEnumerableExtensions
{
public static void ForEach<T>(this IEnumerable<T> @this, Action<T> action)
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;
}
}

View File

@@ -8,7 +8,7 @@
</PropertyGroup>
<PropertyGroup>
<Version>2.1.0</Version>
<Version>2.1.1</Version>
</PropertyGroup>
</Project>