DotNext.Reflection by Roman Sakno

<PackageReference Include="DotNext.Reflection" Version="2.6.0" />

 Function<TArgs, TResult>

public sealed delegate Function<TArgs, TResult> : MulticastDelegate where TArgs : struct
Represents a static function with arbitrary number of arguments allocated on the stack.
public Function(object object, IntPtr method)

public virtual IAsyncResult BeginInvoke(TArgs& modreq(System.Runtime.InteropServices.InAttribute) arguments, AsyncCallback callback, object object)

public virtual TResult EndInvoke(TArgs& modreq(System.Runtime.InteropServices.InAttribute) arguments, IAsyncResult result)

public virtual TResult Invoke(TArgs& modreq(System.Runtime.InteropServices.InAttribute) arguments)