I'm reading from a text file to find the Line Index where a certain line starts with my Criteria.
Turns out there are actually two instances of my desired criteria and I want to get the second one.
How would I amend the below code to Skip the first instance and get the second?
var linesB = File.ReadAllLines(In_EmailBody);
int LineNumberB = 0;
string criteriaB = "T:";
for (LineNumberB = 0; LineNumberB < linesB.Length; LineNumberB++){
if(linesB[LineNumberB].StartsWith(criteriaB))
break;
}
I use the result after and compare it to another criteria to find out the number of lines between the two results.