QueryableExDoWhileTResult Method (IQueryableTResult, ExpressionFuncBoolean) |
Generates an enumerable sequence by repeating a source sequence as long as the given loop postcondition holds.
Namespace: System.LinqAssembly: System.Interactive.Providers (in System.Interactive.Providers.dll) Version: 1.2.0.0
Syntaxpublic static IQueryable<TResult> DoWhile<TResult>(
this IQueryable<TResult> source,
Expression<Func<bool>> condition
)
Parameters
- source
- Type: System.LinqIQueryableTResult
Source sequence to repeat while the condition evaluates true. - condition
- Type: System.Linq.ExpressionsExpressionFuncBoolean
Loop condition.
Type Parameters
- TResult
- Result sequence element type.
Return Value
Type:
IQueryableTResultSequence generated by repeating the given sequence until the condition evaluates to false.
Usage Note
In Visual Basic and C#, you can call this method as an instance method on any object of type
IQueryableTResult. When you use instance method syntax to call this method, omit the first parameter. For more information, see
Extension Methods (Visual Basic) or
Extension Methods (C# Programming Guide).
See Also