Mono Class Library: System.Security.Permissions.SecurityPermission Overview | Members

System.Security.Permissions.SecurityPermission.Union Method

Returns a System.Security.Permissions.SecurityPermission object that is the union of the current instance and the specified object.

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

Parameters

target
A System.Security.Permissions.SecurityPermission object of the same type as the current instance to be combined with the current instance.

Returns

A new System.Security.Permissions.SecurityPermission instance that represents the union of the current instance and target. If the current instance or target is unrestricted, returns a System.Security.Permissions.SecurityPermission instance that is unrestricted. If target is null, returns a copy of the current instance using the System.Security.IPermission.Copy method.

Exceptions

TypeReason
ArgumentExceptiontarget is not null and is not of type System.Security.Permissions.SecurityPermission .

Remarks

Note:

The result of a call to SecurityPermission.Union(System.Security.IPermission) is a permission that represents all of the access to security permissions represented by the current instance as well as the security permissions 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.Security.Permissions
Assembly: mscorlib (in mscorlib.dll)
Assembly Versions: 1.0.5000.0, 2.0.0.0