SPUserCollection.RemoveCollection method
Removes the collection of users represented by a string array that contains their user names.
Namespace: Microsoft.SharePoint
Assembly: Microsoft.SharePoint (in Microsoft.SharePoint.dll)
Syntax
'Declaration
Public Sub RemoveCollection ( _
removeUsersLoginNames As String() _
)
'Usage
Dim instance As SPUserCollection
Dim removeUsersLoginNames As String()
instance.RemoveCollection(removeUsersLoginNames)
public void RemoveCollection(
string[] removeUsersLoginNames
)
Parameters
removeUsersLoginNames
Type: []A string array that contains the user names of users to be removed.
Exceptions
Exception | Condition |
---|---|
SPException | The collection is read-only. |
UnauthorizedAccessException | The current user is not a site administrator. |
ArgumentException | An attempt was made to remove the last administrator for the farm. |