IListSource.ContainsListCollection 属性

定义

获取一个值,该值指示集合是否是 IList 对象的集合。

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

属性值

Boolean

如果集合是 IList 对象集合,则为 true;否则,为 false

示例

下面的代码示例演示如何实现 IListSource 接口。 名为EmployeeListSource的组件指示它不包含IListContainsListCollection方法返回false的数据绑定。 有关完整代码列表,请参阅 如何:实现 IListSource 接口

bool IListSource.ContainsListCollection
{
    get { return 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类包含对象的集合。

适用于

另请参阅