-
array from string
I have a string :
"asasa,bbbbb.ccccc"
I need to split these elements up and place into a string array but I have no idea how many items may appear in the list.
The above string contains 3 elements but may contain 40.
Any idea how I split this up into an array ?
Thanks in Advance
-
Re: array from string
String.Split is overloaded. It allows you to specify multiple delimiters.
-
Re: array from string
Code:
string s={"aaasab,aseder,fg5trgf,fgrtyr.rfgret"};
char[] delim={',','.'};
s.Split(delim);//This is the array of results