Note :This post is first published on Apr-2013 in my previous blog Techkindle. Moving the content here.

Steps:

  1. First, by using the File class static method ReadAllLines(path), read all the lines from the csv file  to the string array.
  2. In the resulting array, first element contains the column names. using the first line, we should create the Data table columns.
  3. Other than the first element, all other elements contains the row’s data. Using the same we can create the data table rows.

Output

Happy Learning 🙂