How can I replace <T>
from the name of the class dynamically? I would like to be able to replace T
using string of the class name.
I tried
Type type = Type.GetType(classname);
configuration.GetSection($"ProjectConfig").Get <type> ()
I get a syntax error for the second line in for type
:
Type is a variable but used as a type