August 5th, 2003, 03:07 PM
Anybody know how to tokenize a string and...
and store it in an ArrayList?
August 5th, 2003, 04:04 PM
A) use a foreach with stringname.Split('char')
B) store in an array like array = stringname.Split('char') then pass off each element to the arraylist, maybe in a for(x<array.Count) ArrayList[x] = array[x];
I think the syntax for foreach is:
ArrayList a = new ArrayList();
String strtok = "String to tokenize";
foreach (String test = strtoke.Split(' '))
Or something to that extent, that should get you in the right direction.
August 6th, 2003, 03:16 PM