How to get typeof declared item in generic List

M

Mirek Endys

Hello,

I need to get the type of item in the declared generic List.

This is my class and my List derrived from List<MyItemClass>

public class MyList : List<MyItemClass>
{

}

public class MyItemClass
{
}


Type t = typeof(MyList);

how to get from 't' the information about type of declared generic type (in
this case typeof(MyItemClass))

thanks
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top