共用方式為


SPPolicyRoleCollection.Add method (String, String)

將原則角色新增至指定的原則角色名稱與描述為基礎的集合。

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

Syntax

'宣告
Public Function Add ( _
    name As String, _
    description As String _
) As SPPolicyRole
'用途
Dim instance As SPPolicyRoleCollection
Dim name As String
Dim description As String
Dim returnValue As SPPolicyRole

returnValue = instance.Add(name, description)
public SPPolicyRole Add(
    string name,
    string description
)

參數

  • name
    Type: System.String

    包含的原則角色名稱的字串。

  • description
    Type: System.String

    包含的原則角色的描述字串。

傳回值

Type: Microsoft.SharePoint.Administration.SPPolicyRole
代表新的原則角色SPPolicyRole物件。

請參閱

參照

SPPolicyRoleCollection class

SPPolicyRoleCollection members

Add overload

Microsoft.SharePoint.Administration namespace