共用方式為


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

適用於