DnsPermission Constructor (PermissionState)

 
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.

Creates a new instance of the DnsPermission class that either allows unrestricted DNS access or disallows DNS access.

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

new : 
        state:PermissionState -> DnsPermission

Parameters

state
Type: System.Security.Permissions.PermissionState

One of the PermissionState values.

Exception Condition
ArgumentException

state is not a valid PermissionState value.

If state is Unrestricted, the DnsPermission instance passes all demands. If state contains any other value, the DnsPermission instance fails all demands.

The following example creates an instance of the DnsPermission class.

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

.NET Framework
Available since 1.1
Return to top
Show: