473,385 Members | 1,523 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,385 software developers and data experts.

string --> arraylist = invalid cast?

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
Apr 26 '06 #1
1 1309
Split returns a string array ...

try ...

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

Cheers,

Greg Young
"Darrel" <no*****@nospam.com> wrote in message
news:Oq**************@TK2MSFTNGP04.phx.gbl...
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

Apr 26 '06 #2

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

1
by: | last post by:
When I execute the following (with an OleDBDataAdapter), wanting to add a row to a visual foxpro table: myrow= datasetTarget.Tables(0).NewRow 'fill all columns here like.. row(i)= myvalue '...
7
by: Brian P | last post by:
I am getting an invalid cast exception when I try to take an ArrayList with datetime values and use the ToArray method to create an object array. I need to use an object array becase I'm working...
3
by: Giulio Santorini | last post by:
Hi, I've got a little problem with my C# WinForms test application. I would like to have a ComboBox showing a a visual value and some hidden values. So I build a class able to store thoose...
1
by: Steph | last post by:
Hello, I'm using COM object in an application. One method used give an object wich type is object. When I use a GetType on its, I have "System.String". I try to convert it to loop on the...
5
by: Nick Flandry | last post by:
I'm running into an Invalid Cast Exception on an ASP.NET application that runs fine in my development environment (Win2K server running IIS 5) and a test environment (also Win2K server running IIS...
1
by: Hifni Shahzard | last post by:
Hi, I got a stored procedure, where it returns a value. But if I execute it. It gives an error as "Invalid cast from System.Int32 to System.Byte.". To make clear how do I execute this, below I'm...
15
by: David | last post by:
Hi, I have built a web application that will be a very high profile application. We had tested it, demonstrated it and shown that it all works. On a dress rehearsal run through, it failed...
10
by: Chet Cromer | last post by:
I am creating a set of base classes and sub classes to use throughout a program I'm developing. The base class represents a generic "lookup table" from my database that contains lists of things...
7
by: chance | last post by:
Getting and error on this first line of code: //inspector phone theField = reader.GetString(20); builder.MoveToBookmark("inspector_phone"); builder.Write(theField); the first line is...
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome former...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.