From 350ad15c403f07e9b05c661bdc2c465e61a70675 Mon Sep 17 00:00:00 2001 From: Timerix Date: Sun, 10 Oct 2021 22:50:54 +0300 Subject: [PATCH] ForEach --- DTLib.csproj | 4 ---- SimpleConverter.cs | 6 ++++++ 2 files changed, 6 insertions(+), 4 deletions(-) diff --git a/DTLib.csproj b/DTLib.csproj index 5cf8ac1..c699849 100644 --- a/DTLib.csproj +++ b/DTLib.csproj @@ -50,10 +50,6 @@ - - - - diff --git a/SimpleConverter.cs b/SimpleConverter.cs index 2fd9819..23d11fa 100644 --- a/SimpleConverter.cs +++ b/SimpleConverter.cs @@ -146,5 +146,11 @@ namespace DTLib } public static void Throw(this Exception ex) => throw ex; + + public static void ForEach(this IEnumerable en, Action act) + { + foreach(T elem in en) + act(elem); + } } } \ No newline at end of file