Note
Access to this page requires authorization. You can try signing in or changing directories.
Access to this page requires authorization. You can try changing directories.
Removes the user with the specified user name from the collection.
Namespace: Microsoft.SharePoint
Assembly: Microsoft.SharePoint (in Microsoft.SharePoint.dll)
Syntax
'Declaration
Public Sub Remove ( _
loginName As String _
)
'Usage
Dim instance As SPUserCollection
Dim loginName As String
instance.Remove(loginName)
public void Remove(
string loginName
)
Parameters
loginName
Type: System.StringA string that contains the user name.
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. |