DnsPermission.Intersect Method (IPermission)

 

Creates a permission instance that is the intersection of the current permission instance and the specified permission instance.

Namespace:   System.Net
Assembly:  System (in System.dll)

override Intersect : 
        target:IPermission -> IPermission

Parameters

target
Type: System.Security.IPermission

The DnsPermission instance to intersect with the current instance.

Return Value

Type: System.Security.IPermission

A DnsPermission instance that represents the intersection of the current DnsPermission instance with the specified DnsPermission instance, or null if the intersection is empty. If both the current instance and target are unrestricted, this method returns a new DnsPermission instance that is unrestricted; otherwise, it returns null.

Exception Condition
ArgumentException

target is neither a DnsPermission nor null.

The Intersect method returns a DnsPermission instance that allows the access defined by both the current DnsPermission instance and the specified DnsPermission instance. Any demand must pass both permissions to pass their intersection.

The following example creates a permission instance that is the intersection of the current permission instance and the specified permission instance.

No code example is currently available or this language may not be supported.

.NET Framework
Available since 1.1
Return to top
Show: