using System; using System.Collections.Generic; using System.Reflection; using System.Text; namespace GlitchyEngine.Extensions; public static class MethodInfoExtension { /// /// Gets the of this . /// /// The type of the Delegate. /// The method info. /// The delegate. public static T GetDelegate(this MethodInfo info) where T : Delegate { return (T)Delegate.CreateDelegate(typeof(T), info); } }