SPRoleAssignmentCollection.RemoveById method
從角色指派集合中移除使用者或群組具有指定識別項 (ID)。
Namespace: Microsoft.SharePoint
Assembly: Microsoft.SharePoint (in Microsoft.SharePoint.dll)
Syntax
'宣告
Public Sub RemoveById ( _
Id As Integer _
)
'用途
Dim instance As SPRoleAssignmentCollection
Dim Id As Integer
instance.RemoveById(Id)
public void RemoveById(
int Id
)
參數
Id
Type: System.Int32若要移除的使用者或群組的識別碼。ID 的值與集合中的角色定義的索引不符。
Exceptions
Exception | Condition |
---|---|
InvalidOperationException | ParentSecurableObject屬性的HasUniqueRoleAssignments屬性是false。 |
備註
這個方法會移除使用者或角色指派集合中的Id參數所指定的群組。
請參閱
參照
SPRoleAssignmentCollection class