Export (0) Print
Expand All

IPermission.Union Method

Creates a permission that is the union of the current permission and the specified permission.

[Visual Basic]
Function Union( _
   ByVal target As IPermission _
) As IPermission
[C#]
IPermission Union(
   IPermission target
);
[C++]
IPermission* Union(
   IPermission* target
);
[JScript]
function Union(
   target : IPermission
) : IPermission;

Parameters

target
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.

Exceptions

Exception Type Condition
ArgumentException The target parameter is not a null reference (Nothing in Visual Basic) and is not of the same type as the current permission.

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.

The following statements are required to be true for all implementations of the Union method. X and Y represent IPermission objects that are not a null reference (Nothing in Visual Basic).

  • X.Union(X) returns an object that has the same value as X.
  • X.Union(Y) returns an object that has the same value as the object returned by Y.Union(X).
  • X.Union(a null reference (Nothing)) returns an object that has the same value as X.

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

IPermission Interface | IPermission Members | System.Security Namespace

Show:
© 2014 Microsoft