mirror of
https://github.com/AlexMacocian/SystemExtensions.git
synced 2026-07-15 14:19:29 +00:00
Merge branch 'master' of https://github.com/AlexMacocian/SystemExtensions
This commit is contained in:
@@ -58,5 +58,14 @@ namespace System.Extensions
|
||||
|
||||
return -1;
|
||||
}
|
||||
|
||||
public static IEnumerable<T> Do<T>(this IEnumerable<T> enumerable, Action<T> action)
|
||||
{
|
||||
foreach(var value in enumerable)
|
||||
{
|
||||
action(value);
|
||||
yield return value;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user