MoreEnumerableToDelimitedStringTSource(IEnumerableTSource, String) Method
Creates a delimited string from a sequence of values and
a given delimiter.
Namespace: MoreLinqAssembly: MoreLinq (in MoreLinq.dll) Version: 3.4.0+b99a6a8cc504caf2d48372fe54a2f8116c59cd0c
public static string ToDelimitedString<TSource>(
this IEnumerable<TSource> source,
string delimiter
)
<ExtensionAttribute>
Public Shared Function ToDelimitedString(Of TSource) (
source As IEnumerable(Of TSource),
delimiter As String
) As String
public:
[ExtensionAttribute]
generic<typename TSource>
static String^ ToDelimitedString(
IEnumerable<TSource>^ source,
String^ delimiter
)
[<ExtensionAttribute>]
static member ToDelimitedString :
source : IEnumerable<'TSource> *
delimiter : string -> string
- source IEnumerableTSource
- 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.
- TSource
- Type of element in the source sequence
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.
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).
This operator uses immediate execution and effectively buffers the sequence.