By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
435,054 Members | 1,304 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 435,054 IT Pros & Developers. It's quick & easy.

String Separator

P: n/a
Can anybody help with this , I have a String like"ABCDE", I wanted to
convert this into string array String array[]={"A","B","C","D","E"}. I
know we have to use string.Split(). But not sure how to send the
Delimiter.

Thanks
K

Sep 27 '06 #1
Share this Question
Share on Google+
4 Replies


P: n/a
You should not use Split() method. Try ToCharArray and call ToString on each
char in the array returned instead.

"kvicky" <ka**************@gmail.comwrote in message
news:11**********************@d34g2000cwd.googlegr oups.com...
Can anybody help with this , I have a String like"ABCDE", I wanted to
convert this into string array String array[]={"A","B","C","D","E"}. I
know we have to use string.Split(). But not sure how to send the
Delimiter.

Thanks
K

Sep 27 '06 #2

P: n/a

Lebesgue wrote:
You should not use Split() method. Try ToCharArray and call ToString on each
char in the array returned instead.

"kvicky" <ka**************@gmail.comwrote in message
news:11**********************@d34g2000cwd.googlegr oups.com...
Can anybody help with this , I have a String like"ABCDE", I wanted to
convert this into string array String array[]={"A","B","C","D","E"}. I
know we have to use string.Split(). But not sure how to send the
Delimiter.

Thanks
K
Thank you so much...it worked!!!

K

Sep 27 '06 #3

P: n/a
KH
You could call Split() with empty string as the delimiter. Less work than
converting to chars and back to strings, assuming the chars need to be
changed back to strings.
"Lebesgue" wrote:
You should not use Split() method. Try ToCharArray and call ToString on each
char in the array returned instead.

"kvicky" <ka**************@gmail.comwrote in message
news:11**********************@d34g2000cwd.googlegr oups.com...
Can anybody help with this , I have a String like"ABCDE", I wanted to
convert this into string array String array[]={"A","B","C","D","E"}. I
know we have to use string.Split(). But not sure how to send the
Delimiter.

Thanks
K


Sep 27 '06 #4

P: n/a
Thanks for pointing this out. I thought this could work but couldn't check
at the time I was replying to the original question.

"KH" <KH@discussions.microsoft.comwrote in message
news:14**********************************@microsof t.com...
You could call Split() with empty string as the delimiter. Less work than
converting to chars and back to strings, assuming the chars need to be
changed back to strings.
"Lebesgue" wrote:
>You should not use Split() method. Try ToCharArray and call ToString on
each
char in the array returned instead.

"kvicky" <ka**************@gmail.comwrote in message
news:11**********************@d34g2000cwd.googleg roups.com...
Can anybody help with this , I have a String like"ABCDE", I wanted to
convert this into string array String array[]={"A","B","C","D","E"}. I
know we have to use string.Split(). But not sure how to send the
Delimiter.

Thanks
K



Sep 28 '06 #5

This discussion thread is closed

Replies have been disabled for this discussion.