System.Net.WebPermission.Intersect Method

Returns the logical intersection of two System.Net.WebPermission instances.

Syntax

public override System.Security.IPermission Intersect (System.Security.IPermission target)

Parameters

target
The System.Net.WebPermission to compare with the current instance.

Returns

A new System.Net.WebPermission that represents the intersection of the current instance and the target parameter. If the intersection is empty, the method returns null.

Exceptions

TypeReason
ArgumentNullException target is null.
ArgumentException target is not null and is not of type System.Net.WebPermission .

Remarks

WebPermission.Intersect(System.Security.IPermission) returns a System.Net.WebPermission that contains those permissions that are common in both target and the current instance.

This method overrides System.Security.CodeAccessPermission.Intersect(System.Security.IPermission) and is implemented to support the System.Security.IPermission interface.

Requirements

Namespace: System.Net
Assembly: System (in System.dll)
Assembly Versions: 1.0.5000.0, 2.0.0.0, 4.0.0.0