RegistryPermission.Union(IPermission) 方法

定义

创建一个权限,该权限是当前权限与指定权限的并集。Creates a permission that is the union of the current permission and the specified permission.

public:
 override System::Security::IPermission ^ Union(System::Security::IPermission ^ other);
public override System.Security.IPermission Union (System.Security.IPermission other);
override this.Union : System.Security.IPermission -> System.Security.IPermission
Public Overrides Function Union (other As IPermission) As IPermission

参数

other
IPermission

与当前权限合并的权限。A permission to combine with the current permission. 它必须与当前权限属于同一类型。It must be of the same type as the current permission.

返回

IPermission

表示同时兼具当前权限和指定权限的新权限。A new permission that represents the union of the current permission and the specified permission.

例外

other 参数不为 null,并且与当前权限不属于同一类型。The other parameter is not null and is not of the same type as the current permission.

注解

调用的结果 Union 是一个权限,它表示当前权限和指定权限所表示的所有操作。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.

适用于