IListSource.ContainsListCollection 属性

定义

获取一个值,该值指示集合是否是 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

属性值

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 用于数据绑定的 false ContainsListCollectionA 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 true 由于 DataSet 类包含集合的集合,因此在中使用此属性将返回。Using this property in DataSet returns true because the DataSet class contains a collection of collections. DataTable false 由于 DataTable 类包含对象的集合,因此在中使用此属性将返回。Using this property in DataTable returns false because the DataTable class contains a collection of objects.

适用于

另请参阅