SPLimitedWebPartCollection.IndexOf method

Searches for the specified Web Part and, if found, returns the zero-based index of the first occurrence within the collection; otherwise returns -1.

Namespace:  Microsoft.SharePoint.WebPartPages
Assembly:  Microsoft.SharePoint (in Microsoft.SharePoint.dll)

Syntax

'Declaration
Public Function IndexOf ( _
    value As WebPart _
) As Integer
'Usage
Dim instance As SPLimitedWebPartCollection
Dim value As WebPart
Dim returnValue As Integer

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

Parameters

Return value

Type: System.Int32

See also

Reference

SPLimitedWebPartCollection class

SPLimitedWebPartCollection members

Microsoft.SharePoint.WebPartPages namespace