Re:Why learning Haskell/Python makes you a worse programmer ...
by danbruc on Monday April 22, 2013 @07:06PM
(#5592281)
There is String.Join also used in the article but now there is a overload accepting IEnumerable<String>.
Using a method group yields an even more readable code. Okay, it depends - if you are not used to method groups, it looks a bit strange but I like it.
Note that I slightly changed and inverted the predicate because there is no build-in String.IsNotNullOrEmpty but you could of course write it yourself. I have a small extension method in my tool library that wraps String.Join and takes care of filtering out null references and empty and white space-only strings.
[ Parent
| on HN ]
There are no comments on this comment yet.