This documentation is archived and is not being maintained.

DnsPermission.Union Method

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

Namespace:  System.Net
Assembly:  System (in System.dll)

abstract Union : 
        target:IPermission -> IPermission 
override Union : 
        target:IPermission -> IPermission 

Parameters

target
Type: System.Security.IPermission
The DnsPermission instance to combine with the current instance.

Return Value

Type: System.Security.IPermission
A DnsPermission instance that represents the union of the current DnsPermission instance with the specified DnsPermission instance. If target is a null reference (Nothing in Visual Basic), this method returns a copy of the current instance. If the current instance or target is unrestricted, this method returns a DnsPermission instance that is unrestricted; otherwise, it returns a DnsPermission instance that is restricted.

Implements

IPermission.Union(IPermission)

ExceptionCondition
ArgumentException

target is neither a DnsPermission nor a null reference (Nothing in Visual Basic).

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

The following example creates a permission instance that is the union of the current permission instance and the specified permission instance.

No code example is currently available or this language may not be supported.

.NET Framework

Supported in: 4, 3.5, 3.0, 2.0, 1.1, 1.0

.NET Framework Client Profile

Supported in: 4, 3.5 SP1

Windows 7, Windows Vista SP1 or later, Windows XP SP3, Windows XP SP2 x64 Edition, Windows Server 2008 (Server Core not supported), Windows Server 2008 R2 (Server Core supported with SP1 or later), Windows Server 2003 SP2

The .NET Framework does not support all versions of every platform. For a list of the supported versions, see .NET Framework System Requirements.
Show: