I have a list of filenames:
List<string> FileList = new List<string>();
FileList.Add("c:\fn1.rpt");
FileList.Add("c:\fn2wxy.txt");
FileList.Add("c:\fn3.pdf");
I have a list of candidates for deletion:
List<string> DeleleList = new List<string>();
DeleteList.Add("fn2")
I have a loop that loops through the file names and I am looking for the correct expression that basically figures out if the file name fragment in the DeleteList matches the current file. In this case, we would delete c:\fn2.txt only. I can iterate the list but it seems as though there must be a Lambda expression somewhere beyond my IQ.
Any help or advice would be greatly appreciated.