I have a generic class foo. I have a Type object called bar.
How do I get the Type foo<bar>? I have seen examples of using a factory type setup when you have an instance of the object, but I don’t have an instance.
Some code:
public class foo<T>
{
}
public Type GetGenericFoo(Type bar)
{
Type genericFooBar = null;
//work magic
return genericFooBar;
}
What about:
so in you’re code it will be like: