Best way to convert Stream - CSV to Data Table
<p>We are receiving a CSV file as Stream. Now we are creating the data table from the stream as below </p>

<pre><code>while (!reader.EndOfStream)
        {
            try
            {
                string[] rows = reader.ReadLine().Split(',');
                DataRow dr = dt.NewRow();
                for (int i = 0; i &lt; dt.Columns.Count; i++)
                {
                    dr[i] = rows[i].Replace("\"", "");
                }
                dt.Rows.Add(dr);
            }
            catch (Exception ex)
            {
                continue;
            }
        }
</code></pre>

<p>It's taking some time to create the Data Table as CSV in Stream contains lot of records. We want to have the best solution to do the same. Can you please share,  If you know any other better solution than this.</p>