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)

Syntax

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

value = instance(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