I would like to create a function that gets a string parameter, determines 2 types based on that parameter and passes that two types to a generic.
public void Foo(string a)
{
var typeb = typebProvider.GetType(a);
var typec = typecPrivoder.GetType(a);
var d = factory.Create<typeb,typec >();
}
the problem is i am getting 'typeb' is a variable but is used like a type. What should I change to get is to work?