Note :This post is first published on Apr-2013 in my previous blog Techkindle. Moving the content to here.
Steps:
- First, by using the File class static method ReadAllLines(path), read all the lines from the csv file to the string array.
- In the resulting array, first element contains the column names. using the first line, we should create the Data table columns.
- 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 Coding :)