NetworkInformationAccess 枚举

定义

指定访问网络接口信息和通信统计数据的权限。Specifies permission to access information about network interfaces and traffic statistics.

此枚举有一个 FlagsAttribute 属性,允许按位组合成员值。

public enum class NetworkInformationAccess
[System.Flags]
public enum NetworkInformationAccess
type NetworkInformationAccess = 
Public Enum NetworkInformationAccess
继承
NetworkInformationAccess
属性

字段

None 0

不能访问网络信息。No access to network information.

Ping 4

对网络信息的 Ping 访问。Ping access to network information.

Read 1

可以读取网络信息。Read access to network information.

示例

下面的代码示例创建一个权限, 该权限控制对网络信息的读取访问。The following code example creates a permission that controls Read access to network information.

System::Net::NetworkInformation::NetworkInformationPermission^ read = gcnew System::Net::NetworkInformation::NetworkInformationPermission( System::Net::NetworkInformation::NetworkInformationAccess::Read );

System.Net.NetworkInformation.NetworkInformationPermission read = 
    new System.Net.NetworkInformation.NetworkInformationPermission(
        System.Net.NetworkInformation.NetworkInformationAccess.Read);
Dim read As New System.Net.NetworkInformation.NetworkInformationPermission( _ 
    System.Net.NetworkInformation.NetworkInformationAccess.Read)

注解

此枚举与NetworkInformationPermission类一起使用, 以指定对权限对象控制的信息的访问级别。This enumeration is used with the NetworkInformationPermission class to specify the level of access to information that the permission object controls.

适用于