SPRoleAssignmentCollection.Remove method (SPPrincipal)
Removes the specified user or group from the role assignment collection.
Namespace: Microsoft.SharePoint
Assembly: Microsoft.SharePoint (in Microsoft.SharePoint.dll)
Syntax
'Declaration
Public Sub Remove ( _
member As SPPrincipal _
)
'Usage
Dim instance As SPRoleAssignmentCollection
Dim member As SPPrincipal
instance.Remove(member)
public void Remove(
SPPrincipal member
)
Parameters
member
Type: Microsoft.SharePoint.SPPrincipalThe user or group to remove.
Exceptions
Exception | Condition |
---|---|
InvalidOperationException | The HasUniqueRoleAssignments property of the ParentSecurableObject property is false. |
Remarks
This method removes the user or group specified by the member parameter from the role assignment collection.
See also
Reference
SPRoleAssignmentCollection class