Edit

Share via


CodeAccessPermission.Union(IPermission) Method

Definition

When overridden in a derived class, creates a permission that is the union of the current permission and the specified permission.

public:
 virtual System::Security::IPermission ^ Union(System::Security::IPermission ^ other);
public virtual System.Security.IPermission Union(System.Security.IPermission other);
abstract member Union : System.Security.IPermission -> System.Security.IPermission
override this.Union : System.Security.IPermission -> System.Security.IPermission
Public Overridable Function Union (other As IPermission) As IPermission

Parameters

other
IPermission

A permission to combine with the current permission. It must be of the same type as the current permission.

Returns

A new permission that represents the union of the current permission and the specified permission.

Implements

Exceptions

The other parameter is not null. This method is only supported at this level when passed null.

Remarks

The result of a call to Union is a permission that represents all the operations represented by both the current permission and the specified permission. Any demand that passes either permission passes their union.

Notes to Inheritors

You must override this method in a derived class. You should return a copy of the permission if the value of the other parameter is null.

Applies to