Note
Access to this page requires authorization. You can try signing in or changing directories.
Access to this page requires authorization. You can try changing directories.
Gets the role definition with the specified name from the collection.
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 ( _
name As String _
) As SPRoleDefinition
Get
'Usage
Dim instance As SPRoleDefinitionCollection
Dim name As String
Dim value As SPRoleDefinition
value = instance.Item(name)
public SPRoleDefinition this[
string name
] { get; }
Parameters
name
Type: System.StringA string that contains the value of the Name property of an SPRoleDefinition object in the collection.
Property Value
Type: Microsoft.SharePoint.SPRoleDefinition
An SPRoleDefinition object that represents the role definition.
Exceptions
| Exception | Condition |
|---|---|
| SPException | The collection does not contain a role definition with that name. |
Remarks
If the collection contains two role definitions with the same name, the indexer returns the first one that is found.
See Also
Reference
SPRoleDefinitionCollection Class