I need to pass a generic type parameter to an interface. I have a string with the name of the type.
I have something like this:
string type = "ClassType";
Type t = Type.GetType("ClassType");
IProvider<t> provider = (IProvider<t>)someObject;
This doesn't work for me. What is the correct way to do it? Thanks.