DataView 類別

定義

代表用於排序、篩選、搜尋、編輯和巡覽的 DataTable 可資料繫結的自訂檢視。Represents a databindable, customized view of a DataTable for sorting, filtering, searching, editing, and navigation. DataView 不儲存資料,卻代表其對應之 DataTable 的連線檢視。The DataView does not store data, but instead represents a connected view of its corresponding DataTable. DataView 的資料變更會影響 DataTableChanges to the DataView's data will affect the DataTable. DataTable 的資料變更會影響所有與它建立關聯的 DataViewChanges to the DataTable's data will affect all DataViews associated with it.

public ref class DataView : System::ComponentModel::MarshalByValueComponent, System::Collections::IList, System::ComponentModel::IBindingListView, System::ComponentModel::ISupportInitialize, System::ComponentModel::ISupportInitializeNotification, System::ComponentModel::ITypedList
public ref class DataView : System::ComponentModel::MarshalByValueComponent, System::Collections::IList, System::ComponentModel::IBindingList, System::ComponentModel::ISupportInitialize, System::ComponentModel::ITypedList
public ref class DataView : System::ComponentModel::MarshalByValueComponent, System::Collections::IList, System::ComponentModel::IBindingListView, System::ComponentModel::ISupportInitializeNotification, System::ComponentModel::ITypedList
public ref class DataView : System::ComponentModel::MarshalByValueComponent, System::ComponentModel::IBindingListView, System::ComponentModel::ISupportInitializeNotification, System::ComponentModel::ITypedList
public class DataView : System.ComponentModel.MarshalByValueComponent, System.Collections.IList, System.ComponentModel.IBindingListView, System.ComponentModel.ISupportInitialize, System.ComponentModel.ISupportInitializeNotification, System.ComponentModel.ITypedList
public class DataView : System.ComponentModel.MarshalByValueComponent, System.Collections.IList, System.ComponentModel.IBindingList, System.ComponentModel.ISupportInitialize, System.ComponentModel.ITypedList
public class DataView : System.ComponentModel.MarshalByValueComponent, System.Collections.IList, System.ComponentModel.IBindingListView, System.ComponentModel.ISupportInitializeNotification, System.ComponentModel.ITypedList
public class DataView : System.ComponentModel.MarshalByValueComponent, System.ComponentModel.IBindingListView, System.ComponentModel.ISupportInitializeNotification, System.ComponentModel.ITypedList
type DataView = class
    inherit MarshalByValueComponent
    interface ICollection
    interface IEnumerable
    interface IList
    interface IBindingList
    interface IBindingListView
    interface ISupportInitialize
    interface ISupportInitializeNotification
    interface ITypedList
type DataView = class
    inherit MarshalByValueComponent
    interface IBindingList
    interface IList
    interface ICollection
    interface IEnumerable
    interface ITypedList
    interface ISupportInitialize
type DataView = class
    inherit MarshalByValueComponent
    interface IBindingListView
    interface IBindingList
    interface IList
    interface ICollection
    interface IEnumerable
    interface ITypedList
    interface ISupportInitializeNotification
    interface ISupportInitialize
type DataView = class
    inherit MarshalByValueComponent
    interface IBindingListView
    interface ITypedList
    interface ISupportInitializeNotification
    interface IBindingList
    interface IList
    interface ICollection
    interface IEnumerable
    interface ISupportInitialize
Public Class DataView
Inherits MarshalByValueComponent
Implements IBindingListView, IList, ISupportInitialize, ISupportInitializeNotification, ITypedList
Public Class DataView
Inherits MarshalByValueComponent
Implements IBindingList, IList, ISupportInitialize, ITypedList
Public Class DataView
Inherits MarshalByValueComponent
Implements IBindingListView, IList, ISupportInitializeNotification, ITypedList
Public Class DataView
Inherits MarshalByValueComponent
Implements IBindingListView, ISupportInitializeNotification, ITypedList
繼承
實作

範例

下列範例會建立一個 DataTable 具有一個資料行和五個數據列的單一。The following example creates a single DataTable with one column and five rows. DataView系統會建立兩個物件,並 RowStateFilter 在每個物件上設定,以顯示資料表資料的不同視圖。Two DataView objects are created and the RowStateFilter is set on each to show different views of the table data. 然後會列印這些值。The values are then printed.

using System;
using System.Xml;
using System.Data;
using System.Data.Common;
using System.Windows.Forms;

public class Form1: Form
{
    protected DataSet DataSet1;
    protected DataGrid dataGrid1;

    private void DemonstrateDataView()
    {
        // Create one DataTable with one column.
        DataTable table = new DataTable("table");
        DataColumn colItem = new DataColumn("item",
            Type.GetType("System.String"));
        table.Columns.Add(colItem);

        // Add five items.
        DataRow NewRow;
        for(int i = 0; i <5; i++)
        {
            NewRow = table.NewRow();
            NewRow["item"] = "Item " + i;
            table.Rows.Add(NewRow);
        }
        // Change the values in the table.
        table.AcceptChanges();
        table.Rows[0]["item"]="cat";
        table.Rows[1]["item"] = "dog";

        // Create two DataView objects with the same table.
        DataView firstView = new DataView(table);
        DataView secondView = new DataView(table);

        // Print current table values.
        PrintTableOrView(table,"Current Values in Table");

        // Set first DataView to show only modified
        // versions of original rows.
        firstView.RowStateFilter=DataViewRowState.ModifiedOriginal;

        // Print values.
        PrintTableOrView(firstView,"First DataView: ModifiedOriginal");

        // Add one New row to the second view.
        DataRowView rowView;
        rowView=secondView.AddNew();
        rowView["item"] = "fish";

        // Set second DataView to show modified versions of
        // current rows, or New rows.
        secondView.RowStateFilter=DataViewRowState.ModifiedCurrent
            | DataViewRowState.Added;
        // Print modified and Added rows.
        PrintTableOrView(secondView,
            "Second DataView: ModifiedCurrent | Added");
    }

    private void PrintTableOrView(DataTable table, string label)
    {
        // This function prints values in the table or DataView.
        Console.WriteLine("\n" + label);
        for(int i = 0; i<table.Rows.Count;i++)
        {
            Console.WriteLine("\table" + table.Rows[i]["item"]);
        }
        Console.WriteLine();
    }

    private void PrintTableOrView(DataView view, string label)
    {

        // This overload prints values in the table or DataView.
        Console.WriteLine("\n" + label);
        for(int i = 0; i<view.Count;i++)
        {
            Console.WriteLine("\table" + view[i]["item"]);
        }
        Console.WriteLine();
    }
}
Private Sub DemonstrateDataView()
    ' Create one DataTable with one column.
    Dim table As New DataTable("table")
    Dim colItem As New DataColumn("item", _
        Type.GetType("System.String"))
    table.Columns.Add(colItem)

    ' Add five items.
    Dim NewRow As DataRow
    Dim i As Integer
    For i = 0 To 4
    
    NewRow = table.NewRow()
    NewRow("item") = "Item " & i
    table.Rows.Add(NewRow)
    Next
    table.AcceptChanges()

    ' Create two DataView objects with the same table.
    Dim firstView As New DataView(table)
    Dim secondView As New DataView(table)
    
    ' Change the values in the table.
    table.Rows(0)("item") = "cat"
    table.Rows(1)("item") = "dog"
    
    ' Print current table values.
    PrintTableOrView(table, "Current Values in Table")
        
    ' Set first DataView to show only modified versions of original rows.
    firstView.RowStateFilter = DataViewRowState.ModifiedOriginal

    ' Print values.    
    PrintTableOrView(firstView, "First DataView: ModifiedOriginal")

    ' Add one New row to the second view.
    Dim rowView As DataRowView
    rowView = secondView.AddNew()
    rowView("item") = "fish"
    ' Set second DataView to show modified versions of 
    ' current rows, or New rows.
    secondView.RowStateFilter = DataViewRowState.ModifiedCurrent _
        Or DataViewRowState.Added
    ' Print modified and Added rows.
    PrintTableOrView(secondView, _
        "Second DataView: ModifiedCurrent or Added")
End Sub
    
Overloads Private Sub PrintTableOrView( _
    ByVal view As DataView, ByVal label As String)
    Console.WriteLine(label)
    Dim i As Integer
    For i = 0 To view.count - 1
    
    Console.WriteLine(view(i)("item"))
    Next
    Console.WriteLine()
End Sub
    
Overloads Private Sub PrintTableOrView( _
    ByVal table As DataTable, ByVal label As String)
    Console.WriteLine(label)
    Dim i As Integer
    For i = 0 To table.Rows.Count - 1
    Console.WriteLine(table.Rows(i)("item"))
    Next
    Console.WriteLine()
End Sub

下列範例會建立 DataView 依據 total LINQ to DataSet 查詢所排序的線上訂單:The following example creates a DataView of online orders ordered by total due from a LINQ to DataSet query:

DataTable orders = dataSet.Tables["SalesOrderHeader"];

EnumerableRowCollection<DataRow> query =
    from order in orders.AsEnumerable()
    where order.Field<bool>("OnlineOrderFlag") == true
    orderby order.Field<decimal>("TotalDue")
    select order;

DataView view = query.AsDataView();

bindingSource1.DataSource = view;
Dim orders As DataTable = dataSet.Tables("SalesOrderHeader")

Dim query = _
    From order In orders.AsEnumerable() _
    Where order.Field(Of Boolean)("OnlineOrderFlag") = True _
    Order By order.Field(Of Decimal)("TotalDue") _
    Select order

Dim view As DataView = query.AsDataView()
bindingSource1.DataSource = view

備註

的主要功能 DataView 是允許 Windows Forms 和 Web Form 的資料系結。A major function of the DataView is to allow for data binding on both Windows Forms and Web Forms.

此外,還 DataView 可以自訂,以顯示的資料子集 DataTableAdditionally, a DataView can be customized to present a subset of data from the DataTable. 這項功能可讓您有兩個系結至相同的控制項 DataTable ,但會顯示不同版本的資料。This capability lets you have two controls bound to the same DataTable, but that show different versions of the data. 例如,一個控制項可能會系結至 DataView 顯示資料表中所有資料列的,而另一個控制項則可能設定為只顯示已從刪除的資料列 DataTableFor example, one control might be bound to a DataView that shows all the rows in the table, and a second might be configured to display only the rows that have been deleted from the DataTable. DataTable也有 DefaultView 屬性。The DataTable also has a DefaultView property. 這會傳回資料表的預設值 DataViewThis returns the default DataView for the table. 例如,如果您想要在資料表上建立自訂視圖,請將 RowFilter 上所傳回的設定為 DataView DefaultViewFor example, if you want to create a custom view on the table, set the RowFilter on the DataView returned by the DefaultView.

若要建立篩選和排序的資料檢視,請設定 RowFilterSort 屬性。To create a filtered and sorted view of data, set the RowFilter and Sort properties. 然後,使用 Item[] 屬性來傳回單一 DataRowViewThen, use the Item[] property to return a single DataRowView.

您也可以使用和方法,從資料列集合新增和 AddNew 刪除 DeleteYou can also add and delete from the set of rows using the AddNew and Delete methods. 當您使用這些方法時, RowStateFilter 屬性可以設定,以指定只顯示已刪除的資料列或新的資料列 DataViewWhen you use those methods, the RowStateFilter property can set to specify that only deleted rows or new rows be displayed by the DataView.

注意

如果您未明確指定的排序準則 DataView ,則 DataRowView 中的物件 DataView 會根據中對應的 DataView 索引來排序 DataRow DataTable.Rows DataRowCollectionIf you do not explicitly specify sort criteria for DataView, the DataRowView objects in DataView are sorted based on the index of DataView's corresponding DataRow in the DataTable.Rows DataRowCollection.

LINQ to DataSet 可讓開發人員使用 LINQ,在上建立複雜且功能強大的查詢 DataSetLINQ to DataSet allows developers to create complex, powerful queries over a DataSet by using LINQ. 但是,LINQ to DataSet 查詢會傳回物件的列舉 DataRow ,但在系結案例中不容易使用。A LINQ to DataSet query returns an enumeration of DataRow objects, however, which is not easily used in a binding scenario. DataView 您可以從 LINQ to DataSet 查詢建立,並採用該查詢的篩選和排序特性。DataView can be created from a LINQ to DataSet query and takes on the filtering and sorting characteristics of that query. LINQ to DataSet 藉 DataView 由提供以 LINQ 運算式為基礎的篩選和排序功能來擴充的功能,讓您比以字串為基礎的篩選和排序更複雜且功能更強大的篩選和排序作業。LINQ to DataSet extends the functionality of the DataView by providing LINQ expression-based filtering and sorting, which allows for much more complex and powerful filtering and sorting operations than string-based filtering and sorting. 如需詳細資訊,請參閱資料系結 和 LINQ to DataSetSee Data Binding and LINQ to DataSet for more information.

建構函式

DataView()

初始化 DataView 類別的新執行個體。Initializes a new instance of the DataView class.

DataView(DataTable)

使用指定的 DataView 初始化 DataTable 類別的新執行個體。Initializes a new instance of the DataView class with the specified DataTable.

DataView(DataTable, String, String, DataViewRowState)

使用指定的 DataTableRowFilterSortDataViewRowState,初始化 DataView 類別的新執行個體。Initializes a new instance of the DataView class with the specified DataTable, RowFilter, Sort, and DataViewRowState.

屬性

AllowDelete

設定或取得值,這個值表示是否允許刪除。Gets or sets a value that indicates whether deletes are allowed.

AllowEdit

取得或設定值,指出是否允許編輯。Gets or sets a value that indicates whether edits are allowed.

AllowNew

取得或設定值,指出是否可以使用 AddNew() 方法加入新的資料列。Gets or sets a value that indicates whether the new rows can be added by using the AddNew() method.

ApplyDefaultSort

取得或設定值,指出是否要使用預設排序。Gets or sets a value that indicates whether to use the default sort. 預設排序是依 PrimaryKey 指定的所有主要金鑰遞增排序。The default sort is (ascending) by all primary keys as specified by PrimaryKey.

Container

取得元件的容器。Gets the container for the component.

(繼承來源 MarshalByValueComponent)
Count

取得套用 RowFilterRowStateFilter 之後,DataView 中的記錄數目。Gets the number of records in the DataView after RowFilter and RowStateFilter have been applied.

DataViewManager

取得與這份檢視相關聯的 DataViewManagerGets the DataViewManager associated with this view.

DesignMode

取得值,表示元件目前是否處於設計模式。Gets a value indicating whether the component is currently in design mode.

(繼承來源 MarshalByValueComponent)
Events

取得附加在這個元件上的事件處理常式清單。Gets the list of event handlers that are attached to this component.

(繼承來源 MarshalByValueComponent)
IsInitialized

取得值,表示元件是否已初始化。Gets a value that indicates whether the component is initialized.

IsOpen

取得值,指出資料來源目前是否開放且在 DataTable 上投影出資料檢視。Gets a value that indicates whether the data source is currently open and projecting views of data on the DataTable.

Item[Int32]

從指定的資料表取得一列資料。Gets a row of data from a specified table.

RowFilter

取得或設定用來篩選在 DataView 中檢視之資料列的運算式。Gets or sets the expression used to filter which rows are viewed in the DataView.

RowStateFilter

取得或設定在 DataView 使用的資料列狀態篩選。Gets or sets the row state filter used in the DataView.

Site

取得或設定元件的網站。Gets or sets the site of the component.

(繼承來源 MarshalByValueComponent)
Sort

取得或設定排序資料行或資料行,並排序 DataView 的次序。Gets or sets the sort column or columns, and sort order for the DataView.

Table

取得或設定來源 DataTableGets or sets the source DataTable.

方法

AddNew()

將新資料列加入 DataViewAdds a new row to the DataView.

BeginInit()

開始對表單或另一個元件所使用的 DataView 進行初始化作業。Starts the initialization of a DataView that is used on a form or used by another component. 初始化會於執行階段時執行。The initialization occurs at runtime.

Close()

關閉 DataViewCloses the DataView.

ColumnCollectionChanged(Object, CollectionChangeEventArgs)

成功變更 DataColumnCollection 後發生。Occurs after a DataColumnCollection has been changed successfully.

CopyTo(Array, Int32)

將項目複製到陣列。Copies items into an array. 僅適用於 Web Form 介面。Only for Web Forms Interfaces.

Delete(Int32)

刪除指定索引處的資料列。Deletes a row at the specified index.

Dispose()

釋放 MarshalByValueComponent 所使用的所有資源。Releases all resources used by the MarshalByValueComponent.

(繼承來源 MarshalByValueComponent)
Dispose(Boolean)

處置 DataView 物件所使用的資源 (除了記憶體之外)。Disposes of the resources (other than memory) used by the DataView object.

EndInit()

結束對表單或另一個元件所使用的 DataView 進行初始化作業。Ends the initialization of a DataView that is used on a form or used by another component. 初始化會於執行階段時執行。The initialization occurs at runtime.

Equals(DataView)

判斷指定的 DataView 執行個體是否視為相等。Determines whether the specified DataView instances are considered equal.

Equals(Object)

判斷指定的物件是否等於目前的物件。Determines whether the specified object is equal to the current object.

(繼承來源 Object)
Find(Object)

依據指定的排序索引鍵值,找出 DataView 中的資料列。Finds a row in the DataView by the specified sort key value.

Find(Object[])

依據指定的排序索引鍵值,找出 DataView 中的資料列。Finds a row in the DataView by the specified sort key values.

FindRows(Object)

傳回 DataRowView 物件的陣列,其資料行符合指定的排序鍵值。Returns an array of DataRowView objects whose columns match the specified sort key value.

FindRows(Object[])

傳回 DataRowView 物件的陣列,其資料行符合指定的排序鍵值。Returns an array of DataRowView objects whose columns match the specified sort key value.

GetEnumerator()

取得這個 DataView 的列舉值。Gets an enumerator for this DataView.

GetHashCode()

做為預設雜湊函式。Serves as the default hash function.

(繼承來源 Object)
GetService(Type)

取得 IServiceProvider 的實作器。Gets the implementer of the IServiceProvider.

(繼承來源 MarshalByValueComponent)
GetType()

取得目前執行個體的 TypeGets the Type of the current instance.

(繼承來源 Object)
IndexListChanged(Object, ListChangedEventArgs)

成功變更 DataView 後發生。Occurs after a DataView has been changed successfully.

MemberwiseClone()

建立目前 Object 的淺層複製。Creates a shallow copy of the current Object.

(繼承來源 Object)
OnListChanged(ListChangedEventArgs)

引發 ListChanged 事件。Raises the ListChanged event.

Open()

開啟 DataViewOpens a DataView.

Reset()

已保留供內部使用。Reserved for internal use only.

ToString()

傳回任何包含 Component 名稱的 StringReturns a String containing the name of the Component, if any. 不應覆寫此方法。This method should not be overridden.

(繼承來源 MarshalByValueComponent)
ToTable()

根據現有 DataView 中的資料列,建立並傳回新的 DataTableCreates and returns a new DataTable based on rows in an existing DataView.

ToTable(Boolean, String[])

根據現有 DataView 中的資料列,建立並傳回新的 DataTableCreates and returns a new DataTable based on rows in an existing DataView.

ToTable(String)

根據現有 DataView 中的資料列,建立並傳回新的 DataTableCreates and returns a new DataTable based on rows in an existing DataView.

ToTable(String, Boolean, String[])

根據現有 DataView 中的資料列,建立並傳回新的 DataTableCreates and returns a new DataTable based on rows in an existing DataView.

UpdateIndex()

已保留供內部使用。Reserved for internal use only.

UpdateIndex(Boolean)

已保留供內部使用。Reserved for internal use only.

事件

Disposed

加入事件處理常式來接聽元件上的 Disposed 事件。Adds an event handler to listen to the Disposed event on the component.

(繼承來源 MarshalByValueComponent)
Initialized

發生於 DataView 的初始化完成時。Occurs when initialization of the DataView is completed.

ListChanged

發生於清單受 DataView 變更管理時。Occurs when the list managed by the DataView changes.

明確介面實作

IBindingList.AddIndex(PropertyDescriptor)

如需這個成員的說明,請參閱 AddIndex(PropertyDescriptor)For a description of this member, see AddIndex(PropertyDescriptor).

IBindingList.AddNew()

如需這個成員的說明,請參閱 AddNew()For a description of this member, see AddNew().

IBindingList.AllowEdit

如需這個成員的說明,請參閱 AllowEditFor a description of this member, see AllowEdit.

IBindingList.AllowNew

如需這個成員的說明,請參閱 AllowNewFor a description of this member, see AllowNew.

IBindingList.AllowRemove

如需這個成員的說明,請參閱 AllowRemoveFor a description of this member, see AllowRemove.

IBindingList.ApplySort(PropertyDescriptor, ListSortDirection)

如需這個成員的說明,請參閱 ApplySort(PropertyDescriptor, ListSortDirection)For a description of this member, see ApplySort(PropertyDescriptor, ListSortDirection).

IBindingList.Find(PropertyDescriptor, Object)

如需這個成員的說明,請參閱 Find(PropertyDescriptor, Object)For a description of this member, see Find(PropertyDescriptor, Object).

IBindingList.IsSorted

如需這個成員的說明,請參閱 IsSortedFor a description of this member, see IsSorted.

IBindingList.RemoveIndex(PropertyDescriptor)

如需這個成員的說明,請參閱 RemoveIndex(PropertyDescriptor)For a description of this member, see RemoveIndex(PropertyDescriptor).

IBindingList.RemoveSort()

如需這個成員的說明,請參閱 RemoveSort()For a description of this member, see RemoveSort().

IBindingList.SortDirection

如需這個成員的說明,請參閱 SortDirectionFor a description of this member, see SortDirection.

IBindingList.SortProperty

如需這個成員的說明,請參閱 SortPropertyFor a description of this member, see SortProperty.

IBindingList.SupportsChangeNotification

如需這個成員的說明,請參閱 SupportsChangeNotificationFor a description of this member, see SupportsChangeNotification.

IBindingList.SupportsSearching

如需這個成員的說明,請參閱 SupportsSearchingFor a description of this member, see SupportsSearching.

IBindingList.SupportsSorting

如需這個成員的說明,請參閱 SupportsSortingFor a description of this member, see SupportsSorting.

IBindingListView.ApplySort(ListSortDescriptionCollection)

如需這個成員的說明,請參閱 ApplySort(ListSortDescriptionCollection)For a description of this member, see ApplySort(ListSortDescriptionCollection).

IBindingListView.Filter

如需這個成員的說明,請參閱 FilterFor a description of this member, see Filter.

IBindingListView.RemoveFilter()

如需這個成員的說明,請參閱 RemoveFilter()For a description of this member, see RemoveFilter().

IBindingListView.SortDescriptions

如需這個成員的說明,請參閱 SortDescriptionsFor a description of this member, see SortDescriptions.

IBindingListView.SupportsAdvancedSorting

如需這個成員的說明,請參閱 SupportsAdvancedSortingFor a description of this member, see SupportsAdvancedSorting.

IBindingListView.SupportsFiltering

如需這個成員的說明,請參閱 SupportsFilteringFor a description of this member, see SupportsFiltering.

ICollection.IsSynchronized

如需這個成員的說明,請參閱 IsSynchronizedFor a description of this member, see IsSynchronized.

ICollection.SyncRoot

如需這個成員的說明,請參閱 SyncRootFor a description of this member, see SyncRoot.

IList.Add(Object)

如需這個成員的說明,請參閱 Add(Object)For a description of this member, see Add(Object).

IList.Clear()

如需這個成員的說明,請參閱 Clear()For a description of this member, see Clear().

IList.Contains(Object)

如需這個成員的說明,請參閱 Contains(Object)For a description of this member, see Contains(Object).

IList.IndexOf(Object)

如需這個成員的說明,請參閱 IndexOf(Object)For a description of this member, see IndexOf(Object).

IList.Insert(Int32, Object)

如需這個成員的說明,請參閱 Insert(Int32, Object)For a description of this member, see Insert(Int32, Object).

IList.IsFixedSize

如需這個成員的說明,請參閱 IsFixedSizeFor a description of this member, see IsFixedSize.

IList.IsReadOnly

如需這個成員的說明,請參閱 IsReadOnlyFor a description of this member, see IsReadOnly.

IList.Item[Int32]

如需這個成員的說明,請參閱 Item[Int32]For a description of this member, see Item[Int32].

IList.Remove(Object)

如需這個成員的說明,請參閱 Remove(Object)For a description of this member, see Remove(Object).

IList.RemoveAt(Int32)

如需這個成員的說明,請參閱 RemoveAt(Int32)For a description of this member, see RemoveAt(Int32).

ITypedList.GetItemProperties(PropertyDescriptor[])

如需這個成員的說明,請參閱 GetItemProperties(PropertyDescriptor[])For a description of this member, see GetItemProperties(PropertyDescriptor[]).

ITypedList.GetListName(PropertyDescriptor[])

如需這個成員的說明,請參閱 GetListName(PropertyDescriptor[])For a description of this member, see GetListName(PropertyDescriptor[]).

擴充方法

Cast<TResult>(IEnumerable)

IEnumerable 的項目轉換成指定的型別。Casts the elements of an IEnumerable to the specified type.

OfType<TResult>(IEnumerable)

根據指定的型別來篩選 IEnumerable 的項目。Filters the elements of an IEnumerable based on a specified type.

AsParallel(IEnumerable)

啟用查詢的平行化作業。Enables parallelization of a query.

AsQueryable(IEnumerable)

IEnumerable 轉換成 IQueryableConverts an IEnumerable to an IQueryable.

適用於

執行緒安全性

此類型對於多執行緒讀取作業而言是安全的。This type is safe for multithreaded read operations. 您必須同步處理任何寫入作業。You must synchronize any write operations.

另請參閱