using System; using System.Reflection; namespace Reflex.Extensions { internal static class MethodInfoExtensions { public static T CreateDelegate(this MethodInfo methodInfo) where T : Delegate { return (T) methodInfo.CreateDelegate(typeof(T)); } } }