TypedTableBaseExtensions.Where<TRow> 方法

定义

根据指定的谓词筛选行序列。

public:
generic <typename TRow>
 where TRow : System::Data::DataRow[System::Runtime::CompilerServices::Extension]
 static System::Data::EnumerableRowCollection<TRow> ^ Where(System::Data::TypedTableBase<TRow> ^ source, Func<TRow, bool> ^ predicate);
public static System.Data.EnumerableRowCollection<TRow> Where<TRow>(this System.Data.TypedTableBase<TRow> source, Func<TRow,bool> predicate) where TRow : System.Data.DataRow;
static member Where : System.Data.TypedTableBase<'Row (requires 'Row :> System.Data.DataRow)> * Func<'Row, bool (requires 'Row :> System.Data.DataRow)> -> System.Data.EnumerableRowCollection<'Row (requires 'Row :> System.Data.DataRow)> (requires 'Row :> System.Data.DataRow)
<Extension()>
Public Function Where(Of TRow As DataRow) (source As TypedTableBase(Of TRow), predicate As Func(Of TRow, Boolean)) As EnumerableRowCollection(Of TRow)

类型参数

TRow

中的sourceDataRow行元素的类型。

参数

source
TypedTableBase<TRow>

包含要筛选的TypedTableBase<T>元素的 ADataRow

predicate
Func<TRow,Boolean>

用于测试条件的每个元素的函数。

返回

一个 OrderedEnumerableRowCollection<TRow> 包含满足条件的输入序列中的行。

适用于