SPUserCollection.Remove method (Int32)
集合中移除指定索引處的使用者。
Namespace: Microsoft.SharePoint
Assembly: Microsoft.SharePoint (in Microsoft.SharePoint.dll)
Syntax
'宣告
Public Sub Remove ( _
index As Integer _
)
'用途
Dim instance As SPUserCollection
Dim index As Integer
instance.Remove(index)
public void Remove(
int index
)
參數
index
Type: System.Int32指定的索引為 32 位元整數。
Exceptions
Exception | Condition |
---|---|
SPException | 這個集合是唯讀。 |
UnauthorizedAccessException | 目前的使用者不是網站管理員。 |
ArgumentException | 您嘗試移除陣列的最後一位管理員。 |
ArgumentOutOfRangeException | index是集合的允許範圍外。 -或- 這個集合是空的。 |
備註
這個方法會從集合移除指定的使用者。當使用者從集合移除時,所有後續的使用者移集合中的一個索引] 及 [集合計數會遞減。