diff --git a/csharp/Lib/Utils/Utils.cs b/csharp/Lib/Utils/Utils.cs index c76476a35..6df10758b 100644 --- a/csharp/Lib/Utils/Utils.cs +++ b/csharp/Lib/Utils/Utils.cs @@ -31,7 +31,13 @@ public static class Utils return (T) Convert.ChangeType(c, type); } - + public static T Do(this T t, Action action) + { + action(); + return t; + } + + [DebuggerStepThrough][MethodImpl(AggressiveInlining | AggressiveOptimization)] public static void Nop(T _) {}