NetworkInformationPermission.Access Propiedad

Definición

Obtiene el nivel de acceso a la información de red controlada por este permiso.

public:
 property System::Net::NetworkInformation::NetworkInformationAccess Access { System::Net::NetworkInformation::NetworkInformationAccess get(); };
public System.Net.NetworkInformation.NetworkInformationAccess Access { get; }
member this.Access : System.Net.NetworkInformation.NetworkInformationAccess
Public ReadOnly Property Access As NetworkInformationAccess

Valor de propiedad

Uno de los valores de NetworkInformationAccess.

Ejemplos

En el ejemplo de código siguiente se crea un NetworkInformationPermission, se le agrega un NetworkInformationAccess valor y se muestra el valor de esta propiedad.

System::Net::NetworkInformation::NetworkInformationPermission^ permission = gcnew System::Net::NetworkInformation::NetworkInformationPermission( System::Security::Permissions::PermissionState::None );
permission->AddPermission( System::Net::NetworkInformation::NetworkInformationAccess::Read );
Console::WriteLine( L"Access is {0}", permission->Access );
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);
Dim permission As New System.Net.NetworkInformation.NetworkInformationPermission( _
    System.Security.Permissions.PermissionState.None)
permission.AddPermission(System.Net.NetworkInformation.NetworkInformationAccess.Read)
Console.WriteLine("Access is {0}", permission.Access)

Comentarios

Se concede | PingRead acceso a un NetworkInformationPermission objeto creado con .PermissionState.Unrestricted Se concede None acceso a un NetworkInformationPermission objeto creado con PermissionState.None .

Se aplica a