Utilities.ReadWhile(StreamReader, Func<String,Boolean>) Method

Definition

Reads while the predicate is satisfied, returns the line on which it failed.

public:
[System::Runtime::CompilerServices::Extension]
 static System::String ^ ReadWhile(System::IO::StreamReader ^ reader, Func<System::String ^, bool> ^ predicate);
public static string ReadWhile (this System.IO.StreamReader reader, Func<string,bool> predicate);
static member ReadWhile : System.IO.StreamReader * Func<string, bool> -> string
<Extension()>
Public Function ReadWhile (reader As StreamReader, predicate As Func(Of String, Boolean)) As String

Parameters

reader
StreamReader

The StreamReader to use for reading.

predicate
Func<String,Boolean>

The predicate that should return false when reading should stop.

Returns

String

The line on which the predicate returned false.

Applies to