ToDelimitedStringExtension.ToDelimitedString(IEnumerable<Boolean>, String) Method

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

Definition

Namespace: MoreLinq.Extensions
Assembly: MoreLinq (in MoreLinq.dll) Version: 4.0.0+092a40d82a1b280568ffa006d9a210bdec0792cd
C#
public static string ToDelimitedString(
	this IEnumerable<bool> source,
	string delimiter
)

Parameters

source  IEnumerable<Boolean>
The sequence of items to delimit. Each is converted to a string using the simple ToString() conversion.
delimiter  String
The delimiter to inject between elements.

Return Value

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 IEnumerable<Boolean>. 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.

Exceptions

ArgumentNullExceptionsource or delimiter is null.

See Also