mgholam / fastCSV

Fast CSV reader writer in c#
https://www.codeproject.com/Articles/5255318/fastCSV
MIT License
30 stars 3 forks source link

Single column CSV file to list of string #17

Open hnmange opened 2 years ago

hnmange commented 2 years ago

How to use Readfile method for single column CSV file? I want to read file directly into list of string only not into any custom type class.

mgholam commented 2 years ago

What have you tried?

hnmange commented 2 years ago

I have tried below code.

var list= fastCSV.ReadFile<string>("sample.csv", ',', (o, c) => { o = c[0]; return true; });

However, I used any existing class type that has a string property as a work around.