SPWebPartCollection.Item Property (Int32)
NOTE: This API is now obsolete.
Obsolete. Gets the Web Part object at the specified index in the collection. In C#, this property is an indexer for the SPWebPartCollection class.
Namespace: Microsoft.SharePoint
Assembly: Microsoft.SharePoint (in Microsoft.SharePoint.dll)
Available in Sandboxed Solutions: No
Syntax
'Declaration
<ObsoleteAttribute("Use SPLimitedWebPartManager instead.")> _
Public ReadOnly Property Item ( _
index As Integer _
) As WebPart
Get
'Usage
Dim instance As SPWebPartCollection
Dim index As Integer
Dim value As WebPart
value = instance.Item(index)
[ObsoleteAttribute("Use SPLimitedWebPartManager instead.")]
public WebPart this[
int index
] { get; }
Parameters
- index
Type: System.Int32
Property Value
Type: Microsoft.SharePoint.WebPartPages.WebPart
A Microsoft.SharePoint.WebPartPages.WebPart object that represents the Web Part.
Remarks
The Item property throws an ArgumentOutOfRangeException if the specified index is outside the valid range of indices for the collection.