samedi 4 juillet 2020

How to call a function with multiple in\out params not knowing their order using Reflection in C#?

I have a type instance t:

  • with a function of whose signature I know only general structure like this public void Action(T1in ps, ..., TNin ps, out T1out,..., out TKout)

and two Dictionaries In and Out

  • with pairs of {Type, instance} inside.

I assume that there are no other arguments required in order to call an Action of t.

So how to call a function with multiple inputs and outputs using Reflection/Dynamitey knowing their types yet not their order?





Aucun commentaire:

Enregistrer un commentaire