System.Net.SocketPermission.Union Method

Returns the logical union between two System.Net.SocketPermission instances.

Syntax

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

Parameters

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

Returns

The System.Net.SocketPermission instance that represents the union of two System.Net.SocketPermission instances. If target parameter is null, it returns a copy of the current instance.

Exceptions

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

Remarks

The result of a call to SocketPermission.Union(System.Security.IPermission) is a permission that represents all of the access to System.Net.Sockets.Socket connections represented by the current instance as well as the access represented by target. Any demand that passes either the current instance or target passes their union. This method overrides System.Security.CodeAccessPermission.Union(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