Hi Guys
am trying to view for each loop values in a multi line textbox but am still failing, below is my code
any help?
}
DirectoryInfo dir = new DirectoryInfo(startFolder); IEnumerable<FileInfo> fileList = dir.GetFiles("*.*", SearchOption.AllDirectories); string searchTerm = "the";
var queryMatchingFiles = from file in fileList where file.Extension == ".pdf" let fileText = GetFileText(file.FullName) where fileText.Contains(searchTerm) select file.FullName;
//Console.WriteLine("The term \"{0}\" was found in:", searchTerm);
textBox2.Text = "The term \"{0}\" was found in:";
foreach (string filename in queryMatchingFiles) { //Console.WriteLine(filename);
textBox2.Text += filename.ToString();