IListSource.ContainsListCollection 屬性

定義

會取得一個值,表示該集合是否為物件集合 IList

public:
 property bool ContainsListCollection { bool get(); };
public bool ContainsListCollection { get; }
member this.ContainsListCollection : bool
Public ReadOnly Property ContainsListCollection As Boolean

屬性值

true 若集合是物件集合 IList ;否則, false

範例

下列程式碼範例示範如何實作 IListSource 介面。 一個名為 EmployeeListSource component 的元件表示它不包含 IList for 資料綁定,因為 是falseContainsListCollection從方法回傳。 完整程式碼列表請參見 「如何實作 IListSource 介面」。

bool IListSource.ContainsListCollection => false;
Public ReadOnly Property ContainsListCollection() As Boolean Implements System.ComponentModel.IListSource.ContainsListCollection
    Get
        Return False
    End Get
End Property

備註

在返回true中使用此特性DataSet,因為類別DataSet包含一組集合。 在回傳false中使用此特性DataTable,是因為該DataTable類別包含一組物件。

適用於

另請參閱