NetworkInformationPermission.Access Property
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
Gets the level of access to network information controlled by this permission.
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
Property Value
One of the NetworkInformationAccess values.
Examples
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 = 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)
Remarks
A NetworkInformationPermission created with PermissionState.Unrestricted is given Ping | Read access. A NetworkInformationPermission created with PermissionState.None is given None access.
Applies to
Povratne informacije
https://aka.ms/ContentUserFeedback.
Kmalu na voljo: V letu 2024 bomo ukinili storitev Težave v storitvi GitHub kot mehanizem za povratne informacije za vsebino in jo zamenjali z novim sistemom za povratne informacije. Za več informacij si oglejte:Pošlji in prikaži povratne informacije za