Here is the original code I wrote (for test purpose):
List<A037Line> a037Lines = new List<A037Line>();
foreach (var textFile in propassBatchFolder.TextFiles)
{
foreach (var a037Line in textFile.A037Lines)
{
if (a037Line.NISS == "80061031738")
{
a037Lines.Add(a037Line);
}
}
}
Resharper suggests the following LINQ code instead:
List<A037Line> a037Lines = (from textFile in propassBatchFolder.TextFiles
from a037Line in textFile.A037Lines
where a037Line.NISS == "80061031738"
select a037Line).ToList();
As I'm a beginner in LINQ, what is the "dotted" version of this LINQ expression?
eg:
propassBatchFolder.TextFiles.Where(…).Select()….ToList()
Many thanks in advance :-)