C# Function as parameter - Repeat method structure
<p>I have multiple methods with different signature, and each method has a try-catch block with custom log exception. (Same structure on multiple controllers).</p>

<pre><code>public class TestController : BaseController
{
    public static ActionResult One(int param1, string param2)
    {
        try
        {
            // Do something
        }
        catch (Exception e)
        {
            LogException(e.Message);
            AddModelError(e.Message);
        }
        return View("ViwName1");
    }

    public static ActionResult Two(Date param3, bool param4)
    {
        try
        {
            // Do something
        }
        catch (Exception e)
        {
            LogException(e.Message);
            AddModelError(e.Message);
        }
        return View("ViwName2");
    }
}
</code></pre>

<p>I wonder if there's a way to avoid try-catch block for every method and execute another</p>

<pre><code>public class TestController : BaseController
{
    public static ActionResult One(int param1, string param2)
    {
        // Do something (*)
        // Call "ActionWithTryCatch" method that has a "function argument" to "Do something (*)"
    }

    public ActionResult ActionWithTryCatch(MyDelegate del, string viewName)
    {
        try
        {
            return del.Invoke();
        }
        catch (Exception e)
        {
            LogException(e.Message);
            AddModelError(e.Message);
        }
        return View(viewName);
    }
}
</code></pre>

<p>¿How can I do that? I've seen examples using delegates but I understand that's strongly typed, so didn't find a way to do that. Thanks!</p>