ObjectPermissionSet.Add Method (ObjectPermission)
Returns an object permission set after adding a new object permission to the referenced permission set.
Namespace: Microsoft.SqlServer.Management.Smo
Assembly: Microsoft.SqlServer.Smo (in Microsoft.SqlServer.Smo.dll)
Syntax
'Declaration
Public Function Add ( _
permission As ObjectPermission _
) As ObjectPermissionSet
'Usage
Dim instance As ObjectPermissionSet
Dim permission As ObjectPermission
Dim returnValue As ObjectPermissionSet
returnValue = instance.Add(permission)
public ObjectPermissionSet Add(
ObjectPermission permission
)
public:
ObjectPermissionSet^ Add(
ObjectPermission^ permission
)
member Add :
permission:ObjectPermission -> ObjectPermissionSet
public function Add(
permission : ObjectPermission
) : ObjectPermissionSet
Parameters
- permission
Type: Microsoft.SqlServer.Management.Smo.ObjectPermission
An ObjectPermission object that specifies the permission to add.
Return Value
Type: Microsoft.SqlServer.Management.Smo.ObjectPermissionSet
An ObjectPermissionSet object that includes the new permission.
Examples
Granting, Revoking, and Denying Permissions