IListSource.ContainsListCollection 属性
定义
重要
一些信息与预发行产品相关,相应产品在发行之前可能会进行重大修改。 对于此处提供的信息,Microsoft 不作任何明示或暗示的担保。
获取一个值,该值指示集合是否是 IList 对象的集合。
public:
property bool ContainsListCollection { bool get(); };
public bool ContainsListCollection { get; }
member this.ContainsListCollection : bool
Public ReadOnly Property ContainsListCollection As Boolean
属性值
如果集合是 IList 对象集合,则为 true
;否则,为 false
。
示例
下面的代码示例演示如何实现 IListSource 接口。 名为EmployeeListSource
的组件指示它不包含IList从ContainsListCollection方法返回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类包含对象的集合。