EnvironmentPermission::SetPathList Method (EnvironmentPermissionAccess, String^)
.NET Framework (current version)
Sets the specified access to the specified environment variables to the existing state of the permission.
Assembly: mscorlib (in mscorlib.dll)
Parameters
- flag
-
Type:
System.Security.Permissions::EnvironmentPermissionAccess
One of the EnvironmentPermissionAccess values.
- pathList
-
Type:
System::String^
A list of environment variables (semicolon-separated).
| Exception | Condition |
|---|---|
| ArgumentNullException | The pathList parameter is null. |
| ArgumentException | The flag parameter is not a valid value of EnvironmentPermissionAccess. |
The previous state of the current permission is overwritten.
The following code example shows the use of the SetPathList method. This code example is part of a larger example provided for the EnvironmentPermission class.
.NET Framework
Available since 1.1
Available since 1.1
Show: