reading record quick enough, i speed up?
this proceed i review file:
open stationary twine readfile(string path)
{
stringbuilder stringfromfile = new stringbuilder();
streamreader sr;
twine s;
sr = file.opentext(path);
s = sr.readline();
while (s != null)
{
stringfromfile.append(sr.readline());
}
sr.close();
relapse stringfromfile.tostring();
}
the problem enlarged (the .txt record 2.5 megs). took over 5 minutes. there improved way?
solution taken
open stationary twine readfile(string path)
{
relapse file.readalltext(path);
}
took reduction 1 second... :)
Comments
Post a Comment