AbfSharp is a .NET library for reading electrophysiology data from Axon Binary Format (ABF) files. ABFSharp wraps ABFFIO.DLL (the official ABF file reading library) and exposes its core functionality with an idiomatic .NET interface.
Because AbfSharp calls a 32-bit Windows DLL, your application must be built against the same target. Modify your csproj file to include:
<TargetFramework>net8.0-windows</TargetFramework>
<PlatformTarget>x86</PlatformTarget>
// Read the first sweep of an ABF file
AbfSharp.ABF abf = new("File_axon_5.abf");
Sweep sweep = abf.GetSweep(0);
// Show the first 5 values of the sweep
for (int i = 0; i < 5; i++)
Console.WriteLine(sweep.Values[i]);