SmtpPermission::Intersect Method (IPermission^)
Creates and returns a permission that is the intersection of the current permission and the specified permission.
Assembly: System (in System.dll)
Parameters
- target
-
Type:
System.Security::IPermission^
An IPermission to intersect with the current permission. It must be of the same type as the current permission.
Return Value
Type: System.Security::IPermission^An SmtpPermission that represents the intersection of the current permission and the specified permission. Returns null if the intersection is empty or target is null.
Implements
IPermission::Intersect(IPermission^)| Exception | Condition |
|---|---|
| ArgumentException | target is not an SmtpPermission. |
The intersection of two permissions is a permission that describes the state they describe in common. Only a demand that passes both original permissions will pass the intersection.
The following code example creates a permission object that is the intersection of an existing permission with an object that grants full access to SMTP servers.
Available since 2.0