Count 方法

上次修改时间: 2015年3月9日

适用范围: SharePoint Foundation 2010

返回 Web 部件属性集合中对象的总数。

collection.Count()

参数

参数

说明

collection  

属性集合 的引用。

备注

使用 Count 方法可返回一个指示 Web 部件 属性集合 中项数的值。如果 Count 方法为 0(零),表明该集合中不包含任何对象。

示例 1:Microsoft Visual Basic Scripting Edition

代码

intPartsCount = WPSC.WebPartPage.Properties.Count()

示例 2:Microsoft JScript

代码

var intPartsCount = WPSC.WebPartPage.Properties.Count();

要求

适用于属性集合

请参阅

其他资源

Web 部件页服务组件 (WPSC) 对象模型