NetworkInformationPermission::Access Property
.NET Framework (current version)
Gets the level of access to network information controlled by this permission.
Assembly: System (in System.dll)
Property Value
Type: System.Net.NetworkInformation::NetworkInformationAccessOne of the NetworkInformationAccess values.
A NetworkInformationPermission created with PermissionState::Unrestricted is given Ping | Read access. A NetworkInformationPermission created with PermissionState::None is given None access.
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 );
.NET Framework
Available since 2.0
Available since 2.0
Show: