lundi 26 août 2019

Expression Tree of a Generic Action

I need to build an expression tree out of Action (if I may formulate it this way) but the problem is that the type T is determined at runtime via reflection.

I need to pass this expression as an argument to a generic method that gets called using the MethodInfo.Invoke API. The type argument for this method and the lambda mentioned above should match.

Is this achievable? Or maybe there are some better / easier ways of doing this?





Aucun commentaire:

Enregistrer un commentaire