I was wondering how to solve this small problem.
I have string
|
I want to insert a "," between every letter in my string, so the end result will be:
h,e,l,l,o,
I tried using arrays, but every time I hit a brick wall.
I tried setting length of the array with;
|
I know that somehow I need to fill that array with test string. and insert delim in it.
Can someone please help me with this issue?
Thank you so much.
prasanta pradhanPosted May 25, 2010, 7:27 AM
string appendcoma(string s,string d)
{
string res=string.Empty;
for (int i = 0; i < s.Length; i++)
{
res += s[i].ToString() + ",";
}
return res;
}
If U have any query plz write clearly
Pradhan Prasanta Kumar
http://globaltouch.in
vedranPosted May 25, 2010, 9:14 AM
This only show that one when having a Programming problem, must sit down and think a lots. Solution was so simple, and yet I couldn't see it.
Thank you again.