CsvHelper.FastDynamic 1.3.1

There is a newer version of this package available.
See the version list below for details.
dotnet add package CsvHelper.FastDynamic --version 1.3.1                
NuGet\Install-Package CsvHelper.FastDynamic -Version 1.3.1                
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.1" />                
For projects that support PackageReference, copy this XML node into the project file to reference the package.
paket add CsvHelper.FastDynamic --version 1.3.1                
#r "nuget: CsvHelper.FastDynamic, 1.3.1"                
#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.1

// Install CsvHelper.FastDynamic as a Cake Tool
#tool nuget:?package=CsvHelper.FastDynamic&version=1.3.1                

CsvHelper.FastDynamic

Build Downloads NuGet License

Fast dynamic CSV records reader and writer extensions for CsvHelper

Installation

Install-Package CsvHelper.FastDynamic
dotnet add package CsvHelper.FastDynamic

Usage

Simple CSV Reader

using CsvHelper;
using CsvHelper.FastDynamic;

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)

using CsvHelper;
using CsvHelper.FastDynamic;

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

Dynamic record reader

BenchmarkDotNet=v0.13.1, OS=Windows 10.0.22000
AMD Ryzen 9 5950X, 1 CPU, 32 logical and 16 physical cores
.NET SDK=6.0.200
  [Host]     : .NET 6.0.2 (6.0.222.6406), X64 RyuJIT
  DefaultJob : .NET 6.0.2 (6.0.222.6406), X64 RyuJIT


|               Method |     Mean |   Error |  StdDev |   Gen 0 |   Gen 1 | Allocated |
|--------------------- |---------:|--------:|--------:|--------:|--------:|----------:|
|           GetRecords | 834.0 us | 3.04 us | 2.85 us | 36.1328 | 17.5781 |    602 KB |
| GetDictionaryRecords | 247.4 us | 0.89 us | 0.78 us | 32.7148 | 16.1133 |    538 KB |
|    GetDynamicRecords | 227.5 us | 0.85 us | 0.80 us | 28.3203 | 13.4277 |    464 KB |

Dynamic record writer

BenchmarkDotNet=v0.13.1, OS=Windows 10.0.22000
AMD Ryzen 9 5950X, 1 CPU, 32 logical and 16 physical cores
.NET SDK=6.0.200
  [Host]     : .NET 6.0.2 (6.0.222.6406), X64 RyuJIT
  DefaultJob : .NET 6.0.2 (6.0.222.6406), X64 RyuJIT


|                            Method |     Mean |   Error |  StdDev |   Gen 0 |  Gen 1 | Allocated |
|---------------------------------- |---------:|--------:|--------:|--------:|-------:|----------:|
|        WriteRecords_DynamicObject | 819.2 us | 0.85 us | 0.76 us | 49.8047 | 9.7656 |    822 KB |
| WriteDynamicRecords_DynamicObject | 455.0 us | 2.22 us | 1.97 us |  7.8125 | 1.4648 |    134 KB |

Thanks

License

This project is licensed under the Apache License 2.0

Product 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 16,832 9/28/2023
1.5.0 1,159 9/4/2023
1.4.0 3,946 10/9/2022
1.3.1 33,305 3/4/2022
1.3.0 7,803 11/24/2021
1.2.0 3,820 2/21/2021
1.1.1 1,261 1/19/2021
1.1.0 741 1/19/2021
1.0.2 3,149 12/19/2020
1.0.1 1,319 9/28/2020
1.0.0 1,006 7/13/2020
1.0.0-preview1 809 6/8/2020