How could I pass the type using Variables to the generic method???
- by Sam Zhou
Hi All,
I have a generic method in c#:
public IList<T> getList<T>();
When I call it as the way below?
...
Type T1=metadata.ModelType;
getList<T1>();
...
I got error in compiling.
How could I do for it?
I really need to pass the type as Variables to the generic method!