Export (0) Print
Expand All

CodeAccessPermission.Union Method

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

[Visual Basic]
Public Overridable Function Union( _
   ByVal other As IPermission _
) As IPermission Implements IPermission.Union
[C#]
public virtual IPermission Union(
 IPermission other
);
[C++]
public: virtual IPermission* Union(
 IPermission* other
);
[JScript]
public function Union(
   other : IPermission
) : IPermission;

Parameters

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

Return Value

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

Implements

IPermission.Union

Exceptions

Exception Type Condition
NotSupportedException The other parameter is not a null reference (Nothing in Visual Basic). This method is only supported at this level when passed a null reference (Nothing).

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 implement this method in a derived class.

Requirements

Platforms: Windows 98, Windows NT 4.0, Windows Millennium Edition, Windows 2000, Windows XP Home Edition, Windows XP Professional, Windows Server 2003 family, Common Language Infrastructure (CLI) Standard

See Also

CodeAccessPermission Class | CodeAccessPermission Members | System.Security Namespace

Show:
© 2014 Microsoft