共用方式為


SPRole.ID property

NOTE: This API is now obsolete.

請改用新的SPRoleDefinitionSPRoleAssignment類別,來定義角色,並將使用者指派給它們。如需詳細資訊,請參閱Changes in the Authorization Object Model。(在Windows SharePoint Services 2.0, ID屬性傳回該角色的成員識別碼和維護回溯相容性。)

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

Syntax

'宣告
<ObsoleteAttribute("Use the SPRoleDefinition class instead")> _
Public Overrides ReadOnly Property ID As Integer
    Get
'用途
Dim instance As SPRole
Dim value As Integer

value = instance.ID
[ObsoleteAttribute("Use the SPRoleDefinition class instead")]
public override int ID { get; }

Property value

Type: System.Int32
32 位元的整數,指定成員 id。

備註

ID屬性的值對應到角色中,在SPMember類別的ID屬性中所包含的唯一成員識別碼。

請參閱

參照

SPRole class

SPRole members

Microsoft.SharePoint namespace