Returns an object that is the intersection of the current instance and the specified System.Security.IPermission object.
- target
- An object of the same type as the current instance to intersect with the current instance.
A new System.Security.IPermission object that is the same type as the current instance and represents the intersection of the current instance and target. If the intersection is empty, or target is null, returns null.
Type Reason ArgumentException target is not null and is not of the same type as the current instance.
The object returns by IPermission.Intersect(IPermission) is a permission that secures the resources and operations secured by two System.Security.IPermission objects: a demand passes the intersection of two objects only if it passes both of the objects.
Operation
If target is not null and is not of the same type as the current instance, a ArgumentException exception is required to be thrown.
The following statements are required to be true for all implementations of the IPermission.Intersect(IPermission) method. X and Y represent non-null System.Security.IPermission object references.
- X.Intersect(X) returns a value equal to X.
- X.Intersect(Y) returns the same value as Y.Intersect(X).
- X.Intersect(null) returns null .
Usage
Use this method to obtain the set of permissions that are described both by the current instance and the specified object.
Namespace: System.Security
Assembly: mscorlib (in mscorlib.dll)
Assembly Versions: 1.0.5000.0, 2.0.0.0