CsvHelper.FastDynamic
1.3.0
There is a newer version of this package available.
See the version list below for details.
See the version list below for details.
dotnet add package CsvHelper.FastDynamic --version 1.3.0
NuGet\Install-Package CsvHelper.FastDynamic -Version 1.3.0
This command is intended to be used within the Package Manager Console in Visual Studio, as it uses the NuGet module's version of Install-Package.
<PackageReference Include="CsvHelper.FastDynamic" Version="1.3.0" />
For projects that support PackageReference, copy this XML node into the project file to reference the package.
paket add CsvHelper.FastDynamic --version 1.3.0
The NuGet Team does not provide support for this client. Please contact its maintainers for support.
#r "nuget: CsvHelper.FastDynamic, 1.3.0"
#r directive can be used in F# Interactive and Polyglot Notebooks. Copy this into the interactive tool or source code of the script to reference the package.
// Install CsvHelper.FastDynamic as a Cake Addin #addin nuget:?package=CsvHelper.FastDynamic&version=1.3.0 // Install CsvHelper.FastDynamic as a Cake Tool #tool nuget:?package=CsvHelper.FastDynamic&version=1.3.0
The NuGet Team does not provide support for this client. Please contact its maintainers for support.
CsvHelper.FastDynamic
Fast dynamic records reader and writer extensions for CsvHelper
Install
Install-Package CsvHelper.FastDynamic
dotnet add package CsvHelper.FastDynamic
Usage
Simple CSV Reader
class Program
{
static void Main(string[] args)
{
using var csvReader = new CsvReader(new StreamReader("sample.csv"), CultureInfo.InvariantCulture);
var records = csvReader.GetDynamicRecords();
foreach (var record in records)
{
Console.WriteLine(record);
}
}
}
Async CSV Enumerate (.NET Standard 2.1 / C# 8.0)
class Program
{
static async Task Main(string[] args)
{
using var csvReader = new CsvReader(new StreamReader("sample.csv"), CultureInfo.InvariantCulture);
var records = csvReader.EnumerateDynamicRecordsAsync();
await foreach (var record in records)
{
Console.WriteLine(record);
}
}
}
Performance
Reader
BenchmarkDotNet=v0.13.1, OS=Windows 10.0.19044.1387 (21H2)
AMD Ryzen 9 5950X, 1 CPU, 32 logical and 16 physical cores
.NET SDK=6.0.100
[Host] : .NET 6.0.0 (6.0.21.52210), X64 RyuJIT
DefaultJob : .NET 6.0.0 (6.0.21.52210), X64 RyuJIT
| Method | Mean | Error | StdDev | Gen 0 | Gen 1 | Allocated |
|--------------------- |---------:|--------:|--------:|--------:|--------:|----------:|
| GetRecords | 868.6 us | 3.65 us | 3.23 us | 36.1328 | 17.5781 | 602 KB |
| GetDictionaryRecords | 254.7 us | 1.35 us | 1.19 us | 32.7148 | 16.1133 | 538 KB |
| GetDynamicRecords | 210.5 us | 1.07 us | 1.00 us | 25.6348 | 11.7188 | 420 KB |
Writer
BenchmarkDotNet=v0.13.1, OS=Windows 10.0.19044.1387 (21H2)
AMD Ryzen 9 5950X, 1 CPU, 32 logical and 16 physical cores
.NET SDK=6.0.100
[Host] : .NET 6.0.0 (6.0.21.52210), X64 RyuJIT
DefaultJob : .NET 6.0.0 (6.0.21.52210), X64 RyuJIT
| Method | Mean | Error | StdDev | Gen 0 | Gen 1 | Allocated |
|------------------------------------- |---------:|--------:|--------:|--------:|-------:|----------:|
| WriteRecords_DynamicObject | 818.5 us | 3.12 us | 2.92 us | 49.8047 | 9.7656 | 822 KB |
| WriteDynamicRecords_DynamicObject | 445.7 us | 2.05 us | 1.82 us | 7.8125 | 1.4648 | 134 KB |
Thanks
License
This project is licensed under the Apache License 2.0
Product | Versions Compatible and additional computed target framework versions. |
---|---|
.NET | net5.0 was computed. net5.0-windows was computed. net6.0 was computed. net6.0-android was computed. net6.0-ios was computed. net6.0-maccatalyst was computed. net6.0-macos was computed. net6.0-tvos was computed. net6.0-windows was computed. net7.0 was computed. net7.0-android was computed. net7.0-ios was computed. net7.0-maccatalyst was computed. net7.0-macos was computed. net7.0-tvos was computed. net7.0-windows was computed. net8.0 was computed. net8.0-android was computed. net8.0-browser was computed. net8.0-ios was computed. net8.0-maccatalyst was computed. net8.0-macos was computed. net8.0-tvos was computed. net8.0-windows was computed. |
.NET Core | netcoreapp2.0 was computed. netcoreapp2.1 was computed. netcoreapp2.2 was computed. netcoreapp3.0 was computed. netcoreapp3.1 was computed. |
.NET Standard | netstandard2.0 is compatible. netstandard2.1 is compatible. |
.NET Framework | net461 was computed. net462 was computed. net463 was computed. net47 was computed. net471 was computed. net472 was computed. net48 was computed. net481 was computed. |
MonoAndroid | monoandroid was computed. |
MonoMac | monomac was computed. |
MonoTouch | monotouch was computed. |
Tizen | tizen40 was computed. tizen60 was computed. |
Xamarin.iOS | xamarinios was computed. |
Xamarin.Mac | xamarinmac was computed. |
Xamarin.TVOS | xamarintvos was computed. |
Xamarin.WatchOS | xamarinwatchos was computed. |
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.
NuGet packages
This package is not used by any NuGet packages.
GitHub repositories
This package is not used by any popular GitHub repositories.
Version | Downloads | Last updated |
---|---|---|
1.5.1 | 17,393 | 9/28/2023 |
1.5.0 | 1,159 | 9/4/2023 |
1.4.0 | 3,951 | 10/9/2022 |
1.3.1 | 33,416 | 3/4/2022 |
1.3.0 | 7,805 | 11/24/2021 |
1.2.0 | 3,822 | 2/21/2021 |
1.1.1 | 1,263 | 1/19/2021 |
1.1.0 | 743 | 1/19/2021 |
1.0.2 | 3,151 | 12/19/2020 |
1.0.1 | 1,321 | 9/28/2020 |
1.0.0 | 1,008 | 7/13/2020 |
1.0.0-preview1 | 809 | 6/8/2020 |