StringBuilderPolyfillExtensionAppendJoinT(StringBuilder, Char, IEnumerableT) Method

Concatenates the string representations of the elements in the provided collection, using the specified separator character between each member, then appends the result to builder.

Definition

Namespace: FolkerKinzel.Strings
Assembly: FolkerKinzel.Strings (in FolkerKinzel.Strings.dll) Version: 9.4.0+10a7d4d71aa960998e32ac0ac6c4fcbe4164c917
C#
public static StringBuilder AppendJoin<T>(
	this StringBuilder builder,
	char separator,
	IEnumerable<T> values
)

Parameters

builder  StringBuilder
The StringBuilder to which the characters are appended.
separator  Char
The character to use as a separator. separator is included in the joined strings only if values has more than one element.
values  IEnumerableT
A collection that contains the objects whose string representations have to be concatenated and appended to builder.

Type Parameters

T
The type of the members of values.

Return Value

StringBuilder
A reference to builder after the append operation has completed.

Usage Note

In Visual Basic and C#, you can call this method as an instance method on any object of type StringBuilder. When you use instance method syntax to call this method, omit the first parameter. For more information, see Extension Methods (Visual Basic) or Extension Methods (C# Programming Guide).

Exceptions

NullReferenceExceptionbuilder is null.
ArgumentNullExceptionvalues is null.

See Also