SPRoleCollection.GetByID method
NOTE: This API is now obsolete.
已過時。請改用新的SPRoleDefinition和SPRoleAssignment類別,來定義角色,並將使用者指派給它們。如需詳細資訊,請參閱Changes in the Authorization Object Model。(在Windows SharePoint Services 2.0, GetByID方法傳回指定的成員 ID 與角色和維護回溯相容性。)
Namespace: Microsoft.SharePoint
Assembly: Microsoft.SharePoint (in Microsoft.SharePoint.dll)
Syntax
'宣告
<ObsoleteAttribute("Use the SPRoleDefinitionCollection class instead")> _
Public Function GetByID ( _
id As Integer _
) As SPRole
'用途
Dim instance As SPRoleCollection
Dim id As Integer
Dim returnValue As SPRole
returnValue = instance.GetByID(id)
[ObsoleteAttribute("Use the SPRoleDefinitionCollection class instead")]
public SPRole GetByID(
int id
)
參數
id
Type: System.Int3232 位元的整數,指定成員 id。
傳回值
Type: Microsoft.SharePoint.SPRole
SPRole 物件,表示該角色。
備註
id參數的值對應到角色中,在SPMember類別的ID屬性中所包含的唯一成員識別碼。