B
booksnore
I have to read data from a flat file with millions of records. I wanted
to find the most efficient way of doing this. I was just going to use a
StreamReader and then break up the input line using Substring as there
are no delimiters however I have a spec for the format of the file. Is
using Substring the only way to do this or is there a more efficient
way?
while ((line = sr.ReadLine()) != null)
{
string param1 = line.Substring(0,5);
string param2 = line.Substring(5,2);
//etc..etc..
}
regards,
Joe
to find the most efficient way of doing this. I was just going to use a
StreamReader and then break up the input line using Substring as there
are no delimiters however I have a spec for the format of the file. Is
using Substring the only way to do this or is there a more efficient
way?
while ((line = sr.ReadLine()) != null)
{
string param1 = line.Substring(0,5);
string param2 = line.Substring(5,2);
//etc..etc..
}
regards,
Joe