Condividi tramite


WebPartPermission.Intersect Method

NOTE: This API is now obsolete.

Returns the logical intersection of two WebPartPermission instances.

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 Intersect ( _
    target As IPermission _
) As IPermission
'Usage
Dim instance As WebPartPermission
Dim target As IPermission
Dim returnValue As IPermission

returnValue = instance.Intersect(target)
[ObsoleteAttribute("Web Part permissions are obsolete and no longer required")]
public override IPermission Intersect(
    IPermission target
)

Parameters

Return Value

Type: System.Security.IPermission
System.Security.IPermission A new WebPartPermission that represents the intersection of the current instance and the target parameter. If the intersection is empty, the method returns a null reference (Nothing in Visual Basic).

Implements

IPermission.Intersect(IPermission)

Remarks

Intersect returns a WebPartPermission that contains the permissions that both the target and the current instance have in common.

Exceptions

Exception Type

Condition

ArgumentException

The target 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