0

I have created a generic TypeDescriptionProvider. I need to register this provider for a particular type during runtime. The type is extracted from IList, So basically I have this

IList
MyTypeProvider<T>

and I need to do something like this:

TypeDescriptor.AddProvider(new MyTypeDescriptionProvider<name>(type), type);

I was able to get the T from IList as Type, but I am unable to pass it to MyTypeDescriptionProvider<>.

Thanks, Goran

Goran
  • 77
  • 1
  • 8
  • possible duplicate of [Pass An Instantiated System.Type as a Type Parameter for a Generic Class](http://stackoverflow.com/questions/266115/pass-an-instantiated-system-type-as-a-type-parameter-for-a-generic-class) – nawfal Jan 18 '14 at 07:54

1 Answers1

0

Is this what you are trying to do?

Community
  • 1
  • 1
Andrew
  • 5,215
  • 1
  • 23
  • 42