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

source 中行元素的类型 DataRow

参数

source
TypedTableBase<TRow>

一个 TypedTableBase<T>,其中包含要筛选的 DataRow 元素。

predicate
Func<TRow,Boolean>

用于测试每个元素是否满足条件的函数。

返回

EnumerableRowCollection<TRow>

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

适用于