Converting and ArrayList into a string
-
Hi I want to convert an ArrayList into a single string (not an array of strings) Looking forward for help Regards,
-
Hi I want to convert an ArrayList into a single string (not an array of strings) Looking forward for help Regards,
string myString;
foreach(object obj in myArrayList)
myString += obj.ToString();You could also add a separator between each item so it's easier to separate if you need to later. For instance "mystring += obj.ToString() + ":"; Then you can separate on ":". -Larantz-
-
Hi I want to convert an ArrayList into a single string (not an array of strings) Looking forward for help Regards,
-
Hi I want to convert an ArrayList into a single string (not an array of strings) Looking forward for help Regards,
Rizwan Rathore wrote:
Looking forward for help
If, when you've been given the correct answer, you don't understand it, you should respond and ask for more info. Given how trivial the answer is, you should probably post a code sample of what you're trying to do, so we can work out what is confusing you. Christian Graus - Microsoft MVP - C++
-
Yeah, I saw this and wondered why my answer had disappeared :-) Christian Graus - Microsoft MVP - C++
-
Rizwan Rathore wrote:
Looking forward for help
If, when you've been given the correct answer, you don't understand it, you should respond and ask for more info. Given how trivial the answer is, you should probably post a code sample of what you're trying to do, so we can work out what is confusing you. Christian Graus - Microsoft MVP - C++
sorry sir, the answer was rite but i was not able to find this thread b4 :( coz i have just started using this question answer thing here.... so after trying a little i thought its easy to repost it... but now i have understand it and i ll take care about it Regards,
-
sorry sir, the answer was rite but i was not able to find this thread b4 :( coz i have just started using this question answer thing here.... so after trying a little i thought its easy to repost it... but now i have understand it and i ll take care about it Regards,
That's fine - if you configure your setting to have a valid email address, you'll get an email with a link when people reply to you. Christian Graus - Microsoft MVP - C++