Share via


SPPermissionCollection.Item Property (Int32)

NOTE: This API is now obsolete.

Gets the permission object at the specified index in the collection. In C#, this property is an indexer for the SPPermissionCollection class.

Namespace:  Microsoft.SharePoint
Assembly:  Microsoft.SharePoint (in Microsoft.SharePoint.dll)
Available in Sandboxed Solutions: No

Syntax

'Declaration
<ObsoleteAttribute("Use the SPRoleAssignmentCollection class instead")> _
Public ReadOnly Property Item ( _
    index As Integer _
) As SPPermission
    Get
'Usage
Dim instance As SPPermissionCollection
Dim index As Integer
Dim value As SPPermission

value = instance.Item(index)
[ObsoleteAttribute("Use the SPRoleAssignmentCollection class instead")]
public SPPermission this[
    int index
] { get; }

Parameters

  • index
    Type: System.Int32

    A 32-bit integer that specifies the index.

Property Value

Type: Microsoft.SharePoint.SPPermission
An SPPermission object that represents the permission.

Remarks

The Item property throws an ArgumentOutOfRangeException if the specified index is outside the valid range of indexes for the collection.

See Also

Reference

SPPermissionCollection Class

SPPermissionCollection Members

Item Overload

Microsoft.SharePoint Namespace