SPLimitedWebPartCollection.Item 属性 (Int32)
获取集合中指定索引处的第一个WebPart 。
命名空间: Microsoft.SharePoint.WebPartPages
程序集: Microsoft.SharePoint(位于 Microsoft.SharePoint.dll 中)
语法
声明
Public ReadOnly Default Property Item ( _
index As Integer _
) As WebPart
Get
用法
Dim instance As SPLimitedWebPartCollection
Dim index As Integer
Dim value As WebPart
value = instance(index)
public WebPart this[
int index
] { get; }
参数
index
类型:System.Int32一个代表集合中的 Web 部件位置的整数。
属性值
类型:System.Web.UI.WebControls.WebParts.WebPart
指定位置处的一个 Web 部件对象。
异常
异常 | 条件 |
---|---|
ArgumentOutOfRangeException | index参数小于零或等于或大于Count。 |