Class EnumerableExtensions
- Namespace
- FluentCommand.Extensions
- Assembly
- FluentCommand.dll
Extension methods for System.Collection.IEnumerable{T}
public static class EnumerableExtensions
- Inheritance
-
EnumerableExtensions
- Inherited Members
Methods
ToDelimitedString(IEnumerable<string?>, string?)
Concatenates the members of a sequence of strings, using the specified delimiter between each member, and returns the resulting string.
public static string ToDelimitedString(this IEnumerable<string?> values, string? delimiter = ",")
Parameters
values
IEnumerable<string>The sequence of string values to concatenate.
null
values are treated as empty strings.delimiter
stringThe string to use as a delimiter. If
null
, a comma (",") is used by default.
Returns
- string
A string that consists of the elements in
values
delimited by thedelimiter
string. Ifvalues
is empty, returns Empty.
ToDelimitedString<T>(IEnumerable<T?>, string?)
Concatenates the members of a sequence, using the specified delimiter between each member, and returns the resulting string.
public static string ToDelimitedString<T>(this IEnumerable<T?> values, string? delimiter = ",")
Parameters
values
IEnumerable<T>The sequence of values to concatenate. Each value will be converted to a string using its
ToString()
method.delimiter
stringThe string to use as a delimiter. If
null
, a comma (",") is used by default.
Returns
- string
A string that consists of the elements in
values
delimited by thedelimiter
string. Ifvalues
is empty, returns Empty.
Type Parameters
T
The type of the elements in the sequence.