Iam new in C# and have some problem. I open a file, but they are large, constains +700 000 lines. In this textfile, Iam looking for a NUMBER of line which contains "mySecretText". Now, I need to search text from line from NUMBER+1 to someOhherLine (for eg. for(line1000; line2000; line++){})
Now my code looks like:
while ((line = file.ReadLine()) != null)
{
i++;
if (line.Contains("mySecretWord"))
{
System.Console.WriteLine("YES");
System.Console.WriteLine(i);
break;
}
}
How to write a loop that read/search only lines <1000; 2000> ??