I am using StreamReader to read my csv file.
My csv file contains very huge data, around 17200 line...
my probelm is, when i execute my application and try to read csv file, then my application screen becomes blank (Consumes memory).
I am using following code to read file...
using (StreamReader sr = new StreamReader(fileStream))
//fileStream is my FileStream object...
// which i have initialized as
//fileStream = new FileStream(CSVFileName, FileMode.OpenOrCreate, FileAccess.ReadWrite, FileShare.None);
{
String temp;
while ((temp = sr.ReadLine()) != null)
{
if (l_strCSVData.Trim().ToString().Equals(""))
l_strCSVData = temp;
else
l_strCSVData = l_strCSVData + '\n' + temp;
}
}
*edit: Please use code tags in the future, thanks!
is there any way to make this reading process fast, so that my screen wont get blank???
This post has been edited by Martyr2: 09 April 2008 - 09:20 AM

New Topic/Question
Reply




MultiQuote





|