SPUserCollection.Remove 方法 (Int32)

移除集合中指定索引处的用户。

命名空间:  Microsoft.SharePoint
程序集:  Microsoft.SharePoint(位于 Microsoft.SharePoint.dll 中)

语法

声明
Public Sub Remove ( _
    index As Integer _
)
用法
Dim instance As SPUserCollection
Dim index As Integer

instance.Remove(index)
public void Remove(
    int index
)

参数

  • index
    类型:System.Int32

    一个 32 整数,它指定的索引。

异常

异常 条件
SPException

该集合是只读的。

UnauthorizedAccessException

当前用户不是站点管理员。

ArgumentException

尝试删除的最后一个服务器场管理员。

ArgumentOutOfRangeException

index是集合的在允许范围。

- 或 -

该集合为空。

备注

此方法从集合中移除指定的用户。当从集合中移除用户时,所有后续用户移一个集合中的索引位置,集合计数会减少。

另请参阅

引用

SPUserCollection 类

SPUserCollection 成员

Remove 重载

Microsoft.SharePoint 命名空间