System.Net.DnsPermission.Union Method

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

Syntax

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

Parameters

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

Returns

A System.Net.DnsPermission instance that represents the union of the current System.Net.DnsPermission instance with the specified System.Net.DnsPermission instance. If target is null, this method returns a copy of the current instance. If the current instance or target is unrestricted, this method returns a System.Net.DnsPermission instance that is unrestricted; otherwise, it returns a System.Net.DnsPermission instance that is restricted.

Exceptions

TypeReason
ArgumentNullException target is null.

Remarks

The DnsPermission.Union(System.Security.IPermission) method returns a System.Net.DnsPermission instance that allows the access defined by either the current System.Net.DnsPermission instance or the specified System.Net.DnsPermission instance. Any demand that passes either permission passes their union.

Requirements

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