NetworkInformationPermission::AddPermission Method (NetworkInformationAccess)
.NET Framework (current version)
Adds the specified value to this permission.
Assembly: System (in System.dll)
Parameters
- access
-
Type:
System.Net.NetworkInformation::NetworkInformationAccess
One of the NetworkInformationAccess values.
Use this method to modify access to network information by adding to the state of the current permission.
The following example creates an empty permission object and then adds to it.
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: