SPUserCollection.RemoveByID method
Removes the user with the specified member ID from the collection.
Namespace: Microsoft.SharePoint
Assembly: Microsoft.SharePoint (in Microsoft.SharePoint.dll)
Syntax
'Declaration
Public Sub RemoveByID ( _
id As Integer _
)
'Usage
Dim instance As SPUserCollection
Dim id As Integer
instance.RemoveByID(id)
public void RemoveByID(
int id
)
Parameters
id
Type: System.Int32A 32-bit integer that specifies the member ID.
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. |
Remarks
The value of the id parameter corresponds to the unique member ID for the site group, which is contained in the ID property of the SPMember class.