mercredi 7 novembre 2018

Calling a generic method using a Type array in C# [duplicate]

This question already has an answer here:

I'm working on a reflection example in C# and I need to call a generic method with two generic types. The two types i want to use for the method are stored inside a Type array.

Basically I want todo this but it won't work:

Type [] myTypes;

MyMethod<myTypes[0], myTypes[1]>();

Any ideas? :)





Aucun commentaire:

Enregistrer un commentaire