Partilhar via


SPRoleDefinitionCollection.Delete Method (String)

Deletes the role definition with the specified display 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 Sub Delete ( _
    roleName As String _
)
'Usage
Dim instance As SPRoleDefinitionCollection
Dim roleName As String

instance.Delete(roleName)
public void Delete(
    string roleName
)

Parameters

  • roleName
    Type: System.String

    A string that contains the display name of the role definition to be deleted.

Remarks

The Delete method unbinds and destroys the data of the role definition, deleting all role assignment bindings for the definition. For example, if the roles Contribute and Author have been assigned to a user and the Author role definition is deleted, the user will have only the Contribute role.

See Also

Reference

SPRoleDefinitionCollection Class

SPRoleDefinitionCollection Members

Delete Overload

Microsoft.SharePoint Namespace