UserCollection.Remove method
Removes the specified user from the collection.
Namespace: Microsoft.SharePoint.Client
Assembly: Microsoft.SharePoint.Client (in Microsoft.SharePoint.Client.dll)
Syntax
'Declaration
Public Sub Remove ( _
user As User _
)
'Usage
Dim instance As UserCollection
Dim user As User
instance.Remove(user)
public void Remove(
User user
)
Parameters
user
Type: Microsoft.SharePoint.Client.UserA User object that represents the user.
It must not be a null reference (Nothing in Visual Basic).
Exceptions
Exception | Condition |
---|---|
[Microsoft.SharePoint.SPException] | User cannot be found, or cannot modify the UserCollection. Error code: -2146232832. |
[System.UnauthorizedAccessException] | The current user has insufficient permissions. Error code: -2147024891. |