DnsPermission.IsSubsetOf Method (IPermission)

 
System_CAPS_noteNote

The .NET API Reference documentation has a new home. Visit the .NET API Browser on docs.microsoft.com to see the new experience.

Determines whether the current permission instance is a subset of the specified permission instance.

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

override IsSubsetOf : 
        target:IPermission -> bool

Parameters

target
Type: System.Security.IPermission

The second DnsPermission instance to be tested for the subset relationship.

Return Value

Type: System.Boolean

false if the current instance is unrestricted and target is either null or unrestricted; otherwise, true.

Exception Condition
ArgumentException

target is neither a DnsPermission nor null.

The current DnsPermission instance is a subset of the specified DnsPermission instance if the current DnsPermission instance specifies a set of operations that is wholly contained by the specified DnsPermission instance.

If the IsSubsetOf method returns true, the current DnsPermission instance allows no more access to DNS servers than does the specified DnsPermission instance.

The following example uses the IsSubsetOf method to determine whether the current permission instance is a subset of 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: