TypedTableBaseExtensions.Where<TRow> Method (TypedTableBase<TRow>, Func<TRow, Boolean>)

 
System_CAPS_noteNote

The .NET API Reference documentation has a new home. Visit the .NET API Browser on docs.microsoft.com to see the new experience.

Filters a sequence of rows based on the specified predicate.

Namespace:   System.Data
Assembly:  System.Data.DataSetExtensions (in System.Data.DataSetExtensions.dll)

public static EnumerableRowCollection<TRow> Where<TRow>(
	this TypedTableBase<TRow> source,
	Func<TRow, bool> predicate
)
where TRow : DataRow

Parameters

source
Type: System.Data.TypedTableBase<TRow>

A TypedTableBase<T> that contains the DataRow elements to filter.

predicate
Type: System.Func<TRow, Boolean>

A function to test each element for a condition.

Return Value

Type: System.Data.EnumerableRowCollection<TRow>

An OrderedEnumerableRowCollection<TRow> that contains rows from the input sequence that satisfy the condition.

Type Parameters

TRow

The type of the row elements in source, DataRow.

.NET Framework
Available since 3.5
Return to top
Show: