Groups | Blog | Home
all groups > asp.net > april 2006 >

asp.net : string --> arraylist = invalid cast?


Darrel
4/25/2006 11:42:59 PM
What's wrong with this vb.net dim?:

Dim imagesToSave As ArrayList = myString.split(",")

With myString = comma delimited string.

I keep getting an invalid cast error with that.

It's late and I'm tired, so I'm likely missing the obvious.

-Darrel

Greg Young [MVP]
4/26/2006 1:31:54 AM
Split returns a string array ...

try ...

Dim imagesToSave() As String = myString.split(",")

Cheers,

Greg Young
[quoted text, click to view]

AddThis Social Bookmark Button