Casting Common Types
2 answers
No, you cannot use it directly. Presumably yours GenericType
is some sort of container. You just need to create a new instance GenericType(Of T)
and copy the content into it, discarding every object from Object
to T
. If you GenericType
had System.Collections.List(Of T)
, then LINQ makes it very easy.
+1
a source to share