Union Method
Collapse the table of content
Expand the table of content

SocketPermission.Union Method (IPermission)

 

Returns the logical union between two SocketPermission instances.

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

override Union : 
        target:IPermission -> IPermission

Parameters

target
Type: System.Security.IPermission

The SocketPermission instance to combine with the current instance.

Return Value

Type: System.Security.IPermission

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

Exception Condition
ArgumentException

target is not a SocketPermission.

The result of a call to Union is a permission that represents all of the access to 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 Union and is implemented to support the IPermission interface.

The following example uses the Union method to return the logical union of two existing SocketPermission instances.

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

.NET Framework
Available since 1.1
Return to top
Show:
© 2016 Microsoft