20 lines
344 B
C#
20 lines
344 B
C#
|
using System;
|
|||
|
using System.Collections.Generic;
|
|||
|
using System.IO;
|
|||
|
|
|||
|
namespace MarkovGrams.Utilities
|
|||
|
{
|
|||
|
public static class StreamReaderExtensions
|
|||
|
{
|
|||
|
public static IEnumerable<string> ReadAllLines(this StreamReader streamReader)
|
|||
|
{
|
|||
|
string line;
|
|||
|
while ((line = streamReader.ReadLine()) != null) {
|
|||
|
yield return line;
|
|||
|
}
|
|||
|
}
|
|||
|
|
|||
|
|
|||
|
}
|
|||
|
}
|