I have the following code to get the object type of a collection:
Dim objType As Type = myCollection.[GetType]().GetProperty("Item").PropertyType
That line seems to work, but then I need to convert the collection to a datatable specifying the type of the collection, what is the correct way to pass the object type as parameter?
I'm trying:
DataTableCollectionConverter.ConvertToDataTable(Of objType)(myCollection)
but it is not even recognized as valid code
I'm using VS 2005, Net 2.0
Thanks in advance.