SPRoleDefinitionCollection.Item property (Int32)

Gets the role definition at the specified index in the collection of role definition objects.

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

Syntax

'Declaration
Public ReadOnly Default Property Item ( _
    index As Integer _
) As SPRoleDefinition
    Get
'Usage
Dim instance As SPRoleDefinitionCollection
Dim index As Integer
Dim value As SPRoleDefinition

value = instance(index)
public SPRoleDefinition this[
    int index
] { get; }

Parameters

  • index
    Type: System.Int32

    A 32-bit integer that specifies the index.

Property value

Type: Microsoft.SharePoint.SPRoleDefinition
An SPRoleDefinition object that represents the role definition.

Exceptions

Exception Condition
ArgumentOutOfRangeException

The value that is passed as an argument must be greater than zero and less than the value of the Count property.

See also

Reference

SPRoleDefinitionCollection class

SPRoleDefinitionCollection members

Item overload

Microsoft.SharePoint namespace