Share via


WebPartPermission.Union Method

NOTE: This API is now obsolete.

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
<ObsoleteAttribute("Web Part permissions are obsolete and no longer required")> _
Public Overrides Function Union ( _
    target As IPermission _
) As IPermission
'Usage
Dim instance As WebPartPermission
Dim target As IPermission
Dim returnValue As IPermission

returnValue = instance.Union(target)
[ObsoleteAttribute("Web Part permissions are obsolete and no longer required")]
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

WebPartPermission Class

WebPartPermission Members

Microsoft.SharePoint.Security Namespace