PrincipalPermission.Union Method (IPermission)
Creates a permission that is the union of the current permission and the specified permission.
Assembly: mscorlib (in mscorlib.dll)
A permission to combine with the current permission. It must be of the same type as the current permission.
Return ValueType: System.Security.IPermission
A new permission that represents the union of the current permission and the specified permission.
The other parameter is an object that is not of the same type as the current permission.
PrincipalPermission objects. It is useful for compactly representing a set of conditions to test. For example, with the declarationscreates a permission representing the criteria of a given set of individual
PrincipalPermission ppBob = new PrincipalPermission("Bob", "Administrator"); PrincipalPermission ppLouise = new PrincipalPermission("Louise", "Administrator");
(ppBob.Union(ppLouise)).Demand() will succeed if the current principal represents Bob in the role of Administrator or Louise in the role of Administrator.
Available since 1.1