Yogesh Vedpathak

Yogesh Vedpathak

  • 674
  • 1.4k
  • 191.7k

taking 2 much time to execution files read write opeartions

Jun 12 2018 6:15 AM
// When put big file it taking  too much time to execution 
problem is here lines.Add(line);
  
 
List<string> lines = new List<string>();
string line = null;
bool success = false;
while ((line = file.ReadLine()) != null)
{
lines.Add(line);
                               
success = true;
}

Answers (1)