SharePointPermission.Union Method

Creates a permission that is the union of the current permission and the specified permission.

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

Syntax

'Declaration
Public Overrides Function Union ( _
    target As IPermission _
) As IPermission
'Usage
Dim instance As SharePointPermission
Dim target As IPermission
Dim returnValue As IPermission

returnValue = instance.Union(target)
public override IPermission Union(
    IPermission target
)

Parameters

Return Value

Type: System.Security.IPermission
System.Security.IPermission A new permission that represents the union of the current permission and the specified permission.

Implements

IPermission.Union(IPermission)

Remarks

The result of a call to Union is a permission that represents all the operations represented by both the current permission and the specified permission. Any demand that passes either permission passes their union.

Exceptions

Exception Type

Condition

ArgumentException

The other parameter is not a null reference (Nothing in Visual Basic) and is not of the same type as the current permission.

See Also

Reference

SharePointPermission Class

SharePointPermission Members

Microsoft.SharePoint.Security Namespace