I have a file that represents elements, on one line there is a GUID clause followed by 5 lines describing the element.
Example:
Line 1: Guid=8e2803d1-444a-4893-a23d-d3b4ba51baee name= line1
Line 2: Item details = bla bla
.
.
Line 7: Guid=79e5e39d-0c17-42aa-a7c4-c5fa9bfe7309 name= line7
Line 8: Item details = bla bla
.
.
First I try to get this file in order to get the GUIDs of elements that match the criteria provided by LINQ, for example. where line.Contains ("line1") .. Thus, I will get the whole line, I will extract the GUID from it, I want to pass this GUID to another function, which should access the file "again", find this line (where line.Contains("line1") && line.Contains("8e2803d1-444a-4893-a23d-d3b4ba51baee")it reads next 5 lines starting from this line.
Is there an effective way to do this?