mercredi 10 juillet 2019

C# Use a Type found via reflection as a generic

I am attempting to use a Type as a generic. Essentially, I'm able to find a Type based off it's signature using reflection. I now need to do something like this:

Type theType = this.getMyType(mySignature);
string convertedData = mappingObj.mapIt<DataBase, theType>(myData);

However, I cannot use theType as a generic. Is there a way to do this?





Aucun commentaire:

Enregistrer un commentaire