A code is worth a thousand words

Parse/read csv file using C#

You are here

The simplest way to parse csv files. I am using external library that does the magic for you. Csv file should be separated by commas and strings with double quotes.

Download "A Fast CSV Reader":At first you have to import the external library. It's called A Fast CSV Reader, made by Sebastien Lorion. Download binaries from codeproject.com. It's shown there as well how to use it. I am going to show my example, maybe its more straight forward.

Add "A Fast CSV Reader" to your project:Your project, there are References. You can see them from Solution Explorer. Just add reference and from Browse tab select you downloaded dll file. Also add it with the using statement.