Spam,
Have you tried:
| Dim MyObjectArray() as Object = External.Function()
Dim theList As New List(Of Object)(MyObjectArray)
If you really want theList to be List(Of Whatever) then you need to start
with an array of Whatever or convert the MyObjectArray to an array of
Whatever first.
| Dim MyObjectArray() as Object = External.Function()
Dim MyWhateverArray() As Whatever
MyWhateverArray = Array.ConvertAll(Of Object,
Whatever)(MyObjectArray, AddressOf Converter)
Dim theList As New List(Of Whatever)(MyWhateverArray)
Private Function Converter(ByVal value As Object) As Whatever
Return CType(value, Whatever)
End Function
Alternatively you could use a For Each to read the MyObjectArray adding the
items to theList.
--
Hope this helps
Jay B. Harlow [MVP - Outlook]
..NET Application Architect, Enthusiast, & Evangelist
T.S. Bradley -
http://www.tsbradley.net
| For example, I have the following:
|
| Dim MyObjectArray() as Object = External.Function()
|
| Is it possible to convert MyObjectArray into a Generics Collection.List?
|
| Thanks.
|