By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
455,335 Members | 1,310 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 455,335 IT Pros & Developers. It's quick & easy.

How to get typeof declared item in generic List

P: n/a
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

Mar 30 '06 #1
Share this Question
Share on Google+
1 Reply


P: n/a
I believe Type.GetGenericArguments

--
Ward Bekker
"Asp.Net Discussions for the Professional Developer"
http://www.dotnettaxi.com

"Free .Net 2.0 C# to/from VB.Net Code Converter"
http://www.dotnettaxi.com/Tools/Converter.aspx
Mar 30 '06 #2

This discussion thread is closed

Replies have been disabled for this discussion.