I have a string having two different types of data in alternating rows (i.e. two rows make one record). I want to select only those records where length of 2nd (i.e. even row) is less than 1000.
I have tried this but it results in selecting only the eventh row and discards the odd row:
var lessthan1000Length = recordsFile.Where((src, index) => src.Length<1000 && index%2 != 0);
Sample data from recordsFile
2012-12-04 | 10:45 AM | Lahore
Added H2SO4 in the solution. Kept it in the lab temperature for 10 minutes
2012-12-04 | 10:55 AM | Lahore
Observed the pH of the solution.
2012-12-04 | 11:20 AM | Lahore
Neutralized the solution to maintain the pH in 6-8 range
Thanks for your guidance.
P.S: Kindly note that the results are required in the form of List<string>
as we have to make a new dataset from it.