Introduction
This article shows you two methods to read data from CSV (Comma Separated File) file:- First method: Reading CSV file without any specific library
- Second method: Reading CSV File using
LinqToCsvlib
Using the Code
Before we begin the explanation of example, let's know about CSV file.a) CSV File
A Comma Separated File stores tabular data (text, number) in plain text each line of file is a record, and each record consists of many fields separated by delimiter (',' , ';' , etc.).Example of CSV content:
Name 1,12/12/2015
Name 2,12/11/2015