System.Net.DnsPermission.Intersect Method

Creates a permission instance that is the intersection of the current permission instance and the specified permission instance.

Syntax

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

Parameters

target
The System.Net.DnsPermission instance to intersect with the current instance.

Returns

A System.Net.DnsPermission instance that represents the intersection of the current System.Net.DnsPermission instance with the specified System.Net.DnsPermission instance, or null if the intersection is empty. If both the current instance and target are unrestricted, this method returns a new System.Net.DnsPermission instance that is unrestricted; otherwise, it returns null.

Exceptions

TypeReason
ArgumentNullException target is null.

Remarks

The DnsPermission.Intersect(System.Security.IPermission) method returns a System.Net.DnsPermission instance that allows the access defined by both the current System.Net.DnsPermission instance and the specified System.Net.DnsPermission instance. Any demand must pass both permissions to pass their intersection.

Requirements

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