Condividi tramite


RoleDefinitionCollection.GetById Method

Returns the role definition with the specified ID from the collection.

Namespace:  Microsoft.SharePoint.Client
Assemblies:   Microsoft.SharePoint.Client.Silverlight (in Microsoft.SharePoint.Client.Silverlight.dll);  Microsoft.SharePoint.Client (in Microsoft.SharePoint.Client.dll)

Syntax

'Declaration
<RemoteAttribute> _
Public Function GetById ( _
    id As Integer _
) As RoleDefinition
'Usage
Dim instance As RoleDefinitionCollection
Dim id As Integer
Dim returnValue As RoleDefinition

returnValue = instance.GetById(id)
[RemoteAttribute]
public RoleDefinition GetById(
    int id
)

Parameters

  • id
    Type: System.Int32

    Specifies the unique identifier of the role definition searched. The value of id does not correspond to the index of the role definition within the collection, but refers to the value of the Id property of the RoleDefinition.

Return Value

Type: Microsoft.SharePoint.Client.RoleDefinition
A RoleDefinition object that represents the role definition.

Exceptions

Exception Condition
ArgumentException

The role definition does not exist in the collection at the given scope. Error code: -2147024809.

See Also

Reference

RoleDefinitionCollection Class

RoleDefinitionCollection Members

Microsoft.SharePoint.Client Namespace