Skip to content
Discussion options

You must be logged in to vote
public static string StringJoin(this IEnumerable<char> chars, string separator)
{
    return chars.Select(c => c.ToString()).StringJoin(separator);
}

Instead of that, do:

public static string StringJoin<T>(this IEnumerable<T> chars, string separator)
{
    return chars.Select(c => c.ToString()).StringJoin(separator);
}

That said, as with teh first comment, string already has an overload for this.

Replies: 3 comments

Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
0 replies
Answer selected by JESUSrosetolife
Comment options

You must be logged in to vote
0 replies
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
3 participants