共用方式為


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)
Available in Sandboxed Solutions: Yes
Available in SharePoint Online

Syntax

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

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