In some part of my code, a collection of objects of type T is passed. I do not know which specific collector I will pass, except impements IEnumerable .
At runtime, I need to figure out what type is T (e.g. System.Double , System.String , etc.).
Is there any way to find out?
UPDATE . Perhaps I should clarify a little the context in which I work (Linq provider).
My function has a signature similar to the following, where I get the type of the collection as a parameter:
string GetSymbolForType(Type collectionType) { }
Is there any way from collectionType to get the contained type of objects?
collections reflection c #
Stefano ricciardi
source share