TypedTableBaseExtensions.AsEnumerable<TRow> 方法

定義

列舉 TypedTableBase<T> 的資料列項目並傳回 EnumerableRowCollection<TRow> 物件,其中泛型參數 TDataRow。 此物件可用於 LINQ 運算式或方法查詢。

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

來源的項目所要轉換的目標型別。

參數

source
TypedTableBase<TRow>

要成為可列舉的來源 TypedTableBase<T>

傳回

EnumerableRowCollection<TRow> 物件,其中泛型參數 TDataRow

適用於