mardi 5 mai 2020

MethodInfo of Func

I have a Delegate that points to Func<T1, TResult> compiled from LambdaExpression.

When I'm using delegate.GetMethodInfo().GetParameters() I see 2 parameters instead of 1!

So in debugger watch MethodInfo looks like:

{TResult lambda_method(System.Runtime.CompilerServices.Closure, System.String)}

Why there is 2 parameters? How to get MethodInfo with correct number of parameters?





Aucun commentaire:

Enregistrer un commentaire