I need to check if a line contains a string before I read it, I want to do this using a while loop something like this
while(reader.ReadLine() != null)
{
array[i] = reader.ReadLine();
}
This obviously doesen't work, so how can I do this selection?
Home / DeveloperSection / Forums / Check if a StreamReader can read another line
I need to check if a line contains a string before I read it, I want to do this using a while loop something like this
while(reader.ReadLine() != null)
{
array[i] = reader.ReadLine();
}
This obviously doesen't work, so how can I do this selection?
Pravesh Singh
31-Jan-2014String row;
while((row=reader.ReadLine())!=null){
array[i]=row;
}