title: Convert method to Delegate?
body: <p>I want to call for example <code>TryDo.Do(MessageBox.Show(""), null);</code></p>
  
  <p>how can I do that??</p>
  
  <pre><code>using System;
  
  namespace TryCatchHandlers
  {
      public static class TryDo
      {
          public static CallResult Do(Delegate action, params object[] args)
          {
              try
              {
                  return new CallResult (action.DynamicInvoke(args), action.Method.ReturnType, true);
              }
              catch
              {
                  return new CallResult(null, null, false);
              }
          }
      }
  
      public class CallResult
      {
          public CallResult() { }
  
          internal CallResult(object result, Type resultType, bool isSuccessful)
          {
              Result = result;
              ResultType = resultType;
              IsSuccessful = isSuccessful;
          }
          public object Result { get; private set; }
          public Type ResultType { get; private set; }
          public bool IsSuccessful { get; private set; }
      }
  }
  </code></pre>