PermissionSet.Union(PermissionSet) 方法

定义

创建 PermissionSet,它是当前的 PermissionSet 和指定的 PermissionSet 的并集。

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

参数

other
PermissionSet

与当前的 PermissionSet 形成并集的权限集。

返回

一个新权限集,它表示当前 PermissionSet 与指定 PermissionSet 的并集。

示例

下面的代码示例演示如何使用 Union 方法。 此代码示例是为 PermissionSet 类提供的一个更大示例的一部分。


// Display the union of two permission sets.
PermissionSet^ ps5 = ps3->Union( ps4 );
Console::WriteLine( "The union of permission set 3 and permission set 4 = {0}", ps5 );
// Display the union of two permission sets.
PermissionSet ps5 = ps3.Union(ps4);
Console.WriteLine("The union of permission set 3 and permission set 4 = "
    + ps5.ToString());
' Display the union of two permission sets.
Dim ps5 As PermissionSet = ps3.Union(ps4)
Console.WriteLine("The union of permission set 3 and permission set 4 = " & ps5.ToString())

注解

调用 Union 的结果是 , PermissionSet 它表示由当前 PermissionSet 表示的所有操作,以及由指定的 PermissionSet表示的所有操作。 如果其中一个集为 Unrestricted,则联合也为 Unrestricted

适用于