While__1 - waf/Rx.NET GitHub Wiki

EnumerableEx.While<TResult> Method

Generates an enumerable sequence by repeating a source sequence as long as the given loop condition holds.

Namespace: System.Linq
Assembly: System.Interactive (in System.Interactive.dll)

Syntax

public static IEnumerable<TResult> While<TResult>(
	Func<bool> condition,
	IEnumerable<TResult> source
)

Parameters

condition

Type: System.Func<Boolean>
Loop condition.

source

Type: System.Collections.Generic.IEnumerable<TResult>
Sequence to repeat while the condition evaluates true.

Type Parameters

TResult

Result sequence element type.

Return Value

Type: IEnumerable<TResult>
Sequence generated by repeating the given sequence while the condition evaluates to true.

See Also

Reference

EnumerableEx Class
System.Linq Namespace

⚠️ **GitHub.com Fallback** ⚠️