ToDelimitedStringExtension.ToDelimitedString Method (IEnumerable<Int32>, String) |
Creates a delimited string from a sequence of values and
a given delimiter.
Namespace:
MoreLinq.Extensions
Assembly:
MoreLinq (in MoreLinq.dll) Version: 3.3.1+b77df70598ab84c28cd43dcf74594024b6d575e1
Syntaxpublic static string ToDelimitedString(
this IEnumerable<int> source,
string delimiter
)
<ExtensionAttribute>
Public Shared Function ToDelimitedString (
source As IEnumerable(Of Integer),
delimiter As String
) As String
public:
[ExtensionAttribute]
static String^ ToDelimitedString(
IEnumerable<int>^ source,
String^ delimiter
)
[<ExtensionAttribute>]
static member ToDelimitedString :
source : IEnumerable<int> *
delimiter : string -> string
Parameters
- source
- Type: System.Collections.Generic.IEnumerable<Int32>
The sequence of items to delimit. Each is converted to a string using the
simple ToString() conversion. - delimiter
- Type: System.String
The delimiter to inject between elements.
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
IEnumerable<Int32>. 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).
ExceptionsException | Condition |
---|
ArgumentNullException | source or delimiter is null.
|
Remarks
This operator uses immediate execution and effectively buffers the sequence.
See Also