Share via


Add Method

The Add method of the SPPermissionCollection class creates a permission object with the specified member and permissions in the collection.

Parameters

member   A Microsoft.SharePoint.Member object that represents the member.

permissionMask   A Microsoft.SharePoint.SPRights value that specifies the permissions.

Example

The following code example modifies the permissions of a cross-site group for the Announcements list of the current site.

This example requires using directives (Imports in Visual Basic) for both the Microsoft.SharePoint and Microsoft.SharePoint.WebControls namespaces.

Requirements

Platforms: Microsoft Windows Server 2003

Security: Code Access Security