Export (0) Print
Expand All

NetworkInformationPermission.Access Property

Gets the level of access to network information controlled by this permission.

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

public NetworkInformationAccess Access { get; }

The following code example creates a NetworkInformationPermission, adds a NetworkInformationAccess value to it, and displays the value of this property.

System.Net.NetworkInformation.NetworkInformationPermission permission = 
    new System.Net.NetworkInformation.NetworkInformationPermission(
        System.Security.Permissions.PermissionState.None);
permission.AddPermission(
        System.Net.NetworkInformation.NetworkInformationAccess.Read);
Console.WriteLine("Access is {0}", permission.Access);

.NET Framework

Supported in: 4.6, 4.5, 4, 3.5, 3.0, 2.0

.NET Framework Client Profile

Supported in: 4, 3.5 SP1
Show:
© 2015 Microsoft