A new permission that represents the union of the current permission and the specified permission.
Type Reason ArgumentException target is not null and is not of the same type as the current instance.
The result of a call to IPermission.Union(IPermission) 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.
The following statements are required to be true for all implementations of the IPermission.Union(IPermission) method. X and Y represent System.Security.IPermission objects that are not null.
X.Union(X) returns an object that has the same value as X.
X.Union(Y) returns an object that has the same value as the object returned by Y.Union(X).
X.Union(null) returns an object that has the same value as X.