src/Mimp.SeeSharper.Reflection/MethodInfoExtensions.cs
/// <summary>
/// Return a delegate to invoke the method.
/// </summary>
/// <param name="method"></param>
/// <returns></returns>
/// <exception cref="ArgumentNullException"></exception>
Return a delegate to invoke the method.
Return a delegate to invoke the method .
public static Delegate GetInstanceDelegate(this MethodInfo method)
        {
            if (method is null)
                throw new ArgumentNullException(nameof(method));
            return method.GetInstanceDelegate(Expression.GetDelegateType(method.GetInstanceMethodTypes().ToArray()));
        }
public static Delegate GetInstanceDelegate ( this MethodInfo method ) { if ( method is null ) throw new ArgumentNullException ( nameof ( method ) ) ; return method . GetInstanceDelegate ( Expression . GetDelegateType ( method . GetInstanceMethodTypes ( ) . ToArray ( ) ) ) ; }
Return a delegate to invoke the method.
Return a delegate to invoke the method .
None
None
MethodInfo
this
method
None