CSV Reader in C#
Typically, Importing data (contact list) from microsoft outlook to our application is necessary in almost every data driven application. The following examples shows the easy way to implement this functionality in C#. This class can be used in internationalization. ie. it can read unicode character also. using System; using System.Data; using System.Configuration; using System.Web; using System.Web.Security; using System.Web.UI; using System.Web.UI.WebControls; using System.Web.UI.WebControls.WebParts; using System.Web.UI.HtmlControls; using System.Collections; using System.Text; using System.IO; namespace CSVReader { public class CsvParser { public static DataTable Parse(string data, bool headers) { return Parse(new StringReader(data), headers); } public static DataTable Parse(string data) { return Parse(new StringReader(data)); } public static DataTable Parse(TextReader stream) { return Parse(stream, false); ...