jeudi 21 juin 2018

Pass Type argument to Generic Class

I need to pass type as an argument to a generic class. I am trying to get the type from list of types. Example:

List listType;
listType.Add(typeof(x)); //x is the class name
listType.Add(typeof(y)); //y is the class name

listClass.getValues(); //not able to pass argument as generic.





Aucun commentaire:

Enregistrer un commentaire