A scalable and safe implementation of a generic enumerable string join for .Net 3.5. The usage of iterators is so that the join string value is not stuck on the end of the string. Works correctly with 0, 1 and more elements:

+1: This is my preferred way pre .NET 4.0. Much more scalable than producing an entirely new array of strings from a list of ints so that String.Join(String, String[]) can be called. Only thing I'd say is that it's unusual to see this method written as an extension on String as opposed to IEnumerable<String> - I tend to always call it at the end of a long chain of extension method calls.
–
Alex HumphreyAug 31 '10 at 16:32

1

I stole the idea from Python if that is any help!
–
DeletedAug 31 '10 at 19:47

Not sure I like this. IEnumerable<T> already has a Join method, and this new method performs a completely different operation, making its use counterintuitive. Secondly, if you were going to create this method, go ahead and make it generically applicable.
–
Anthony PegramAug 31 '10 at 15:41

This is a decent approach if someone is still on 2.0. However, intArray is unnecessary. List<int> is indexable and has a Count property, making the conversion to an array superfluous. You also might want to make the joining character a parameter rather than hardcoding it into the method.
–
Anthony PegramAug 31 '10 at 15:45