I need a sailor's knot for this string concatenation
- Posted: Nov 22, 2006 at 5:50 AM
- 98 Views
- 1 Comment
Loading User Information from Channel 9
Something went wrong getting user information from Channel 9
Loading User Information from MSDN
Something went wrong getting user information from MSDN
Loading Visual Studio Achievements
Something went wrong getting the Visual Studio Achievements
Phil Haack wrote an entry regarding concatenating delimited strings together. He goes on an shows different approaches on how to create a delimiting function along with some of his commets too.
Phil goes on to mention .Net 2.0 has a string.Join method while .Net 1.1 does not.
If you're using JavaScript, there is a join on array objects too.
Comments have been closed since this content was published more than 30 days ago, but if you'd like to continue the conversation,
please create a new thread in our Forums,
or
Contact Us and let us know.
Follow the Discussion
Oops, something didn't work.
What does this mean?
Following an item on Channel 9 allows you to watch for new content and comments that you are interested in. You need to be signed in to Channel 9 to use this feature.What does this mean?
Following an item on Channel 9 allows you to watch for new content and comments that you are interested in and view them all on your notifications page.sign up for email notifications?
I appreciate the author raising some awareness about string.join (I didn't know it was there), but I think his application of it is a little ill-conceived.
In my opinion, string.join would be most appropriate if you alrady have a string[] for other reasons. If you just want to concatenate strings, using StringBuilder and iterating across all the items will be more efficient most of the time, because it takes time and memory to allocate the temporary string[].
Remove this comment
Remove this thread
close