SPRoleDefinitionBindingCollection.Add method

Adds the specified role definition to the binding collection.

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

Syntax

'Declaration
Public Sub Add ( _
    roleDefinition As SPRoleDefinition _
)
'Usage
Dim instance As SPRoleDefinitionBindingCollection
Dim roleDefinition As SPRoleDefinition

instance.Add(roleDefinition)
public void Add(
    SPRoleDefinition roleDefinition
)

Parameters

Exceptions

Exception Condition
SPException

The role definition is a guest role.

-or-

The role definition is already in the collection.

Remarks

The role definition that is added must be part of the role definition collection that is used in a role assignment.

See also

Reference

SPRoleDefinitionBindingCollection class

SPRoleDefinitionBindingCollection members

Microsoft.SharePoint namespace