共用方式為


SPPrincipal.Roles property

NOTE: This API is now obsolete.

取得與主體關聯的角色集合。

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

Syntax

'宣告
<ObsoleteAttribute("Use the SPRoleAssignment class instead")> _
Public ReadOnly Property Roles As SPRoleCollection
    Get
'用途
Dim instance As SPPrincipal
Dim value As SPRoleCollection

value = instance.Roles
[ObsoleteAttribute("Use the SPRoleAssignment class instead")]
public SPRoleCollection Roles { get; }

Property value

Type: Microsoft.SharePoint.SPRoleCollection
SPRoleCollection 物件,表示角色。

請參閱

參照

SPPrincipal class

SPPrincipal members

Microsoft.SharePoint namespace