Possible Duplicate:
Reflection – Getting the generic parameters from a System.Type instance
Get actual type of T in a generic List<T>
I’m looping through a PropertyInfo-List from a Class.
In this class, I’m interested in the different Lists – for example List<int>, List<string>, List<Book>, aso.
But I don’t know how I get the Type of the List-Objects. I just get something like
System.Collections.Generic.List`1[[System.String, mscorlib, Version=4.0.0.0, Culture=neutral,
PublicKeyToken=b77a5c561934e089]].
I could take this information apart and create a Type out of this information, but I hope there’s a smoother way?
Simple: