Note :This post is first published on Apr-2013 in my previous blog Techkindle. Moving the content to here.
- Create a DataTable Schema.
- Fill the created table with some sample data.
- Create a StringBuilder, by appending all the data, (using comma delimiter)
- Create one new line with data table columns.
- Create one line for each data table row.
- Save the StringBuilder to Csv file, using FileStream.
Happy Coding :)