IListSource.ContainsListCollection IListSource.ContainsListCollection IListSource.ContainsListCollection IListSource.ContainsListCollection Property

定義

取得值,表示集合是否為 IList 物件的集合。Gets a value indicating whether the collection is a collection of IList objects.

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

屬性值

如果集合為 IList 物件的集合,則為 true,否則為 falsetrue if the collection is a collection of IList objects; otherwise, false.

範例

下列程式碼範例示範如何執行IListSource介面。The following code example demonstrates how to implement the IListSource interface. 名為EmployeeListSource的元件表示它不IList包含falseContainsListCollection方法傳回的資料系結。A component named EmployeeListSource indicates that it does not contain an IList for data binding by returning false from the ContainsListCollection method. 如需完整的程式代碼清單, 請參閱如何:執行 IListSource 介面For a full code listing, see How to: Implement the IListSource Interface.

bool IListSource.ContainsListCollection
{
    get { return false; }
}
Public ReadOnly Property ContainsListCollection() As Boolean Implements System.ComponentModel.IListSource.ContainsListCollection
    Get
        Return False
    End Get
End Property

備註

在中DataSet DataSet使用這個屬性會傳回,因為類別包含集合的集合。trueUsing this property in DataSet returns true because the DataSet class contains a collection of collections. 在中DataTable DataTable使用這個屬性會傳回,因為類別包含物件的集合。falseUsing this property in DataTable returns false because the DataTable class contains a collection of objects.

適用於

另請參閱