System.Net.WebPermission.Union Method

Returns the logical union between two instances of the System.Net.WebPermission class.

Syntax

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

Parameters

target
The System.Net.WebPermission to combine with the current System.Net.WebPermission.

Returns

A System.Net.WebPermission that represents the union of the current instance and the target parameter. If either WebPermission is System.Security.Permissions.PermissionState.Unrestricted, the method returns a System.Net.WebPermission that is System.Security.Permissions.PermissionState.Unrestricted. If the target is null, the method returns a copy of the current System.Net.WebPermission.

Exceptions

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

Remarks

WebPermission.Union(System.Security.IPermission) returns a System.Net.WebPermission that contains all the permissions in both target and the current instance.

Requirements

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