Created
June 3, 2024 14:20
-
-
Save jfoshee/5ff2b4be6903a7e123f68d286f10aefa to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public static class StreamReaderExtensions | |
{ | |
public static IEnumerable<string> ReadLines(this StreamReader reader) | |
{ | |
string? line; | |
while ((line = reader.ReadLine()) is not null) | |
{ | |
yield return line; | |
} | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment