CsvConverterExtensionToCsvTSource(IEnumerableTSource, Int32, CsvFromTSource, Char) Method
Converts a collection of
TSource instances to a CSV
String without a header row.
Namespace: FolkerKinzel.CsvTools.MappingsAssembly: FolkerKinzel.CsvTools.Mappings (in FolkerKinzel.CsvTools.Mappings.dll) Version: 1.1.0+1263e8243dc2cd78095f678f813d7d9c52ea4315
public static string ToCsv<TSource>(
this IEnumerable<TSource> data,
int columnsCount,
CsvFrom<TSource> converter,
char delimiter = ','
)
<ExtensionAttribute>
Public Shared Function ToCsv(Of TSource) (
data As IEnumerable(Of TSource),
columnsCount As Integer,
converter As CsvFrom(Of TSource),
Optional delimiter As Char = ","C
) As String
public:
[ExtensionAttribute]
generic<typename TSource>
static String^ ToCsv(
IEnumerable<TSource>^ data,
int columnsCount,
CsvFrom<TSource>^ converter,
wchar_t delimiter = L','
)
[<ExtensionAttribute>]
static member ToCsv :
data : IEnumerable<'TSource> *
columnsCount : int *
converter : CsvFrom<'TSource> *
?delimiter : char
(* Defaults:
let _delimiter = defaultArg delimiter ','
*)
-> string
- data IEnumerableTSource
- The data to convert to CSV. Each item will be represented
with a CSV row.
- columnsCount Int32
- Number of columns in the CSV file.
- converter CsvFromTSource
-
An object that converts a TSource instance to a
CSV row.
- delimiter Char (Optional)
- The field separator character.
- TSource
-
Generic type parameter for the data type to write as CSV row.
StringA CSV
String without header row that contains the contents of
data.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).