共用方式為


SPPolicyRoleCollection class

代表SPPolicyRole物件的集合。

Inheritance hierarchy

System.Object
  Microsoft.SharePoint.Administration.SPAutoSerializingObject
    Microsoft.SharePoint.Administration.SPPolicyRoleCollection

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

Syntax

'宣告
<SharePointPermissionAttribute(SecurityAction.InheritanceDemand, ObjectModel := True)> _
<SharePointPermissionAttribute(SecurityAction.LinkDemand, ObjectModel := True)> _
Public NotInheritable Class SPPolicyRoleCollection _
    Inherits SPAutoSerializingObject _
    Implements IEnumerable
'用途
Dim instance As SPPolicyRoleCollection
[SharePointPermissionAttribute(SecurityAction.InheritanceDemand, ObjectModel = true)]
[SharePointPermissionAttribute(SecurityAction.LinkDemand, ObjectModel = true)]
public sealed class SPPolicyRoleCollection : SPAutoSerializingObject, 
    IEnumerable

備註

使用SPWebApplication類別之PolicyRoles屬性可傳回 Web 應用程式的原則角色的集合。若要建立的原則角色集合中,使用Add方法。

若要從集合中傳回單一原則角色使用索引器。例如,若集合已指派給變數myPolicyRoles,使用myPolicyRoles[index]以 C# 或 Visual Basic.NET,其中index是名稱或索引編號集合中的原則角色中的myPolicyRoles(index) 。

Thread safety

Any public static (Shared in Visual Basic) members of this type are thread safe. Any instance members are not guaranteed to be thread safe.

請參閱

參照

SPPolicyRoleCollection members

Microsoft.SharePoint.Administration namespace