I am developing an application to perform searches inside files, I wrote the following code to do this:
foreach (var file in filesInDir)
{
string[] lines = File.ReadAllLines(file.FullName);
for(int i=0;i<lines.Length;i++)
if(lines[i].Contains("123456789"))
Console.Write("File: {0}\nLine: {1}", file.FullName, i + 1);
}
So, I wonder how I can accomplish this research, using Linq, is this possible to do?