共用方式為


SPRoleAssignmentCollection.Remove method (Int32)

從集合中移除使用者或群組中指定索引處。

Namespace:  Microsoft.SharePoint
Assembly:  Microsoft.SharePoint (in Microsoft.SharePoint.dll)

Syntax

'宣告
Public Sub Remove ( _
    index As Integer _
)
'用途
Dim instance As SPRoleAssignmentCollection
Dim index As Integer

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

參數

  • index
    Type: System.Int32

    若要移除的使用者或群組的索引。

Exceptions

Exception Condition
InvalidOperationException

ParentSecurableObject屬性的HasUniqueRoleAssignments屬性是false。

備註

這個方法並不會刪除任何資料,但 dissociates 物件的權限的使用者。若要刪除角色定義的資料,並刪除所有的角色定義的角色指派繫結,請使用其中一個SPRoleDefinitionCollection物件的Delete方法。

請參閱

參照

SPRoleAssignmentCollection class

SPRoleAssignmentCollection members

Remove overload

Microsoft.SharePoint namespace