开发者

Get object type from collection and passing it to generic class

I have created a generic TypeDescriptionProvider. I need to register this provider for a particular type during runtime. The typ开发者_如何学JAVAe 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


Is this what you are trying to do?

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜