Class StreamReaderExtensions
- Namespace
- Songhay.Extensions
- Assembly
- SonghayCore.dll
Extensions of StreamReader.
public static class StreamReaderExtensions
- Inheritance
-
StreamReaderExtensions
- Inherited Members
Remarks
“StreamReader is designed for character input in a particular encoding, whereas the Stream class is designed for byte input and output.” — https://learn.microsoft.com/en-us/dotnet/api/system.io.streamreader?view=net-5.0#remarks
Methods
ReadLinesAsync(StreamReader?, Func<string?, bool>)
Reads the lines from the specified StreamReader.
public static Task ReadLinesAsync(this StreamReader? reader, Func<string?, bool> lineAction)
Parameters
reader
StreamReaderthe StreamReader
lineAction
Func<string, bool>the line action; return
false
to stop reading lines