SPLimitedWebPartCollection.IndexOf 方法

为指定的搜索 Web 部件和,如果找到,返回集合中第一个出现的从零开始索引否则将返回-1。

命名空间:  Microsoft.SharePoint.WebPartPages
程序集:  Microsoft.SharePoint(位于 Microsoft.SharePoint.dll 中)

语法

声明
Public Function IndexOf ( _
    value As WebPart _
) As Integer
用法
Dim instance As SPLimitedWebPartCollection
Dim value As WebPart
Dim returnValue As Integer

returnValue = instance.IndexOf(value)
public int IndexOf(
    WebPart value
)

参数

返回值

类型:System.Int32

另请参阅

引用

SPLimitedWebPartCollection 类

SPLimitedWebPartCollection 成员

Microsoft.SharePoint.WebPartPages 命名空间