Share via


SPPolicyRoleCollection.Add method (String, String)

Adds a policy role to the collection based on the specified policy role name and description.

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

Syntax

'Declaration
Public Function Add ( _
    name As String, _
    description As String _
) As SPPolicyRole
'Usage
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
)

Parameters

  • name
    Type: System.String

    A string that contains the name of the policy role.

  • description
    Type: System.String

    A string that contains a description for the policy role.

Return value

Type: Microsoft.SharePoint.Administration.SPPolicyRole
An SPPolicyRole object that represents the new policy role.

See also

Reference

SPPolicyRoleCollection class

SPPolicyRoleCollection members

Add overload

Microsoft.SharePoint.Administration namespace