Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- static async IAsyncEnumerable<String> ReadLinesAsync(String filename)
- {
- using (var reader = File.OpenText(filename))
- {
- String line;
- while ((line = await reader.ReadLineAsync()) != null)
- {
- yield return line;
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement