Check out example codes for "csv to dataset c#". It will help you in understanding the concepts better.

Code Example 1

static void Main(string[] args){      string filepath = "d://ConvertedFile.csv";      DataTable res = ConvertCSVtoDataTable(filepath);} 

Code Example 2

public static DataTable ConvertCSVtoDataTable(string strFilePath) {            StreamReader sr = new StreamReader(strFilePath);            string[] headers = sr.ReadLine().Split(',');             DataTable dt = new DataTable();            foreach (string header in headers)            {                dt.Columns.Add(header);            }            while (!sr.EndOfStream)            {                string[] rows = Regex.Split(sr.ReadLine(), ",(?=(?:[^\"]*\"[^\"]*\")*[^\"]*$)");                DataRow dr = dt.NewRow();                for (int i = 0; i < headers.Length; i++)                {                    dr[i] = rows[i];                }                dt.Rows.Add(dr);            }            return dt; }  

Learn ReactJs, React Native from akashmittal.com