Click or drag to resize

MoreEnumerableToDelimitedStringTSource Method (IEnumerableTSource, String)

Creates a delimited string from a sequence of values and a given delimiter.

Namespace:  MoreLinq
Assembly:  MoreLinq (in MoreLinq.dll) Version: 2.4.0
Syntax
public static string ToDelimitedString<TSource>(
	this IEnumerable<TSource> source,
	string delimiter
)

Parameters

source
Type: System.Collections.GenericIEnumerableTSource
The sequence of items to delimit. Each is converted to a string using the simple ToString() conversion.
delimiter
Type: SystemString
The delimiter to inject between elements. May be null, in which case the executing thread's current culture's list separator is used.

Type Parameters

TSource
Type of element in the source sequence

Return Value

Type: String
A string that consists of the elements in source delimited by delimiter. If the source sequence is empty, the method returns an empty string.

Usage Note

In Visual Basic and C#, you can call this method as an instance method on any object of type IEnumerableTSource. 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).
Remarks
This operator uses immediate execution and effectively buffers the sequence.
See Also