Filters the source collection based on a predicate, preserving the order of the source collection.

Namespace:  C1.LiveLinq
Assembly:  C1.LiveLinq (in C1.LiveLinq.dll)

Syntax

C#
public static IIndexedSource<T> Where<T>(
	this IIndexedSource<T> source,
	Expression<Func<T, bool>> predicate,
	bool preserveOriginalOrder
)
Visual Basic
<ExtensionAttribute> _
Public Shared Function Where(Of T) ( _
	source As IIndexedSource(Of T), _
	predicate As Expression(Of Func(Of T, Boolean)), _
	preserveOriginalOrder As Boolean _
) As IIndexedSource(Of T)

Parameters

source
Type: C1.LiveLinq.Indexing..::..IIndexedSource<(Of <(<'T>)>)>
An IIndexedSource<(Of <(<'T>)>)> to filter.
predicate
Type: System.Linq.Expressions..::..Expression<(Of <(<'Func<(Of <(<'T, Boolean>)>)>>)>)>
A function to test each element for a condition.
preserveOriginalOrder
Type: System..::..Boolean
Specifies whether the source order must be preserved in the result.

Type Parameters

T
The type of the elements of source.

Return Value

An IIndexedSource<(Of <(<'T>)>)> that contains elements from the input collection that satisfy the condition.

Remarks

Preserving the order can lessen the effect of performance optimization using an index. Use this overload only if preserving the order in this operation is essential.

See Also