samedi 4 avril 2020

Is there any abstraction in .NET that encapsulates MethodInfo + instance?

I'm playing with Reflection and I would like to encapsulate a call to an instance method.

I always end up doing something like this:

methodInfo.Invoke(instance, parameters)

I wonder if there's any way to encapsulate it to something like call.Invoke(parameters), where the instance is implicit.





Aucun commentaire:

Enregistrer un commentaire