Returns the logical union between two instances of the System.Net.WebPermission class.
- target
- The System.Net.WebPermission to combine with the current System.Net.WebPermission.
A System.Net.WebPermission that represents the union of the current instance and the target parameter. If either WebPermission is System.Security.Permissions.PermissionState.Unrestricted, the method returns a System.Net.WebPermission that is System.Security.Permissions.PermissionState.Unrestricted. If the target is null, the method returns a copy of the current System.Net.WebPermission.
Type Reason ArgumentNullException target is null. ArgumentException target is not null and is not of type System.Net.WebPermission .
WebPermission.Union(System.Security.IPermission) returns a System.Net.WebPermission that contains all the permissions in both target and the current instance.