TypedTableBaseExtensions.AsEnumerable<TRow>(TypedTableBase<TRow>) 方法

定义

枚举 TypedTableBase<T> 的数据行元素并返回一个 EnumerableRowCollection<TRow> 对象,其中泛型参数 TDataRowEnumerates the data row elements of the TypedTableBase<T> and returns an EnumerableRowCollection<TRow> object, where the generic parameter T is DataRow. 此对象可用于 LINQ 表达式或方法查询中。This object can be used in a LINQ expression or method query.

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

类型参数

TRow

源中的元素要转换成的类型。The type to convert the elements of the source to.

参数

source
TypedTableBase<TRow>

可枚举的源 TypedTableBase<T>The source TypedTableBase<T> to make enumerable.

返回

EnumerableRowCollection<TRow>

一个 EnumerableRowCollection<TRow> 对象,其泛型参数 TDataRowAn EnumerableRowCollection<TRow> object, where the generic parameter T is DataRow.

适用于