private static IEnumerable <string> KnipInWoorden(Regel regel) { var firstMatch = true; foreach (var woord in SplitRegels.KnipInWoorden(regel.Tekst)) { if (firstMatch) { yield return($"{regel.Nummer} {woord}"); } else { yield return(woord); } firstMatch = false; } }
private static IEnumerable<string> KnipInWoorden(Regel regel) { var firstMatch = true; foreach (var woord in SplitRegels.KnipInWoorden(regel.Tekst)) { if (firstMatch) yield return $"{regel.Nummer} {woord}"; else yield return woord; firstMatch = false; } }