CollectionExtensions.Join Method

Namespace:
Weavy.Core.Helpers
Assembly:
Weavy.Core.dll

Overloads

Join(IEnumerable, string, Converter) Concatenates a specified separator string between each element of a collection, yielding a single concatenated string.
Join(IEnumerable, string, string, Converter) Concatenates a specified separator string between each element of a collection, yielding a single concatenated string.

Join(IEnumerable, string, Converter)

Concatenates a specified separator string between each element of a collection, yielding a single concatenated string.

public static string Join<T>(this IEnumerable<T> enumerable, string separator, Converter<T, string> converter)

Parameters

enumerable
System.Collections.Generic.IEnumerable<>

The collection whose elements to join.

separator
string

The separator to use between items.

converter
System.Converter<,System.String>

A converter that converts each element from type T to a string.

Returns

string

A string consisting of the elements of enumerable interspersed with the separator string.

Join(IEnumerable, string, string, Converter)

Concatenates a specified separator string between each element of a collection, yielding a single concatenated string.

public static string Join<T>(this IEnumerable<T> enumerable, string separator, string lastseparator, Converter<T, string> converter)

Parameters

enumerable
System.Collections.Generic.IEnumerable<>

The collection whose elements to join.

separator
string

The separator to use between items.

lastseparator
string

The separator to use before the last element.

converter
System.Converter<,System.String>

A converter that converts each element from type T to a string.

Returns

string

A string consisting of the elements of enumerable interspersed with the separator string.