Conversion from System.Array to a Collection

  • Thread starter =?ISO-8859-1?Q?Bernard_Bour=E9e?=
  • Start date
?

=?ISO-8859-1?Q?Bernard_Bour=E9e?=

Hello

I have an external API who provide a function returning an System.Array.

I'm trying to convert it in a ArrayList or an other collection but could
not succeed.

Dim SA as System.Array

SA = MyFunction API() 'which return the System.Array

The conversion

Dim Col as ArrayList
Col = DirectCast( SA, ArrayList)

Does not work.

Thanks for your help.

Bernard
 
H

Herfried K. Wagner [MVP]

Bernard Bourée said:
I have an external API who provide a function returning an System.Array.

I'm trying to convert it in a ArrayList or an other collection but could
not succeed.

\\\
Dim array() As String = ...
Dim al As New ArrayList(array)
///
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top