EnvironmentPermission Constructor (EnvironmentPermissionAccess, String^)
.NET Framework (current version)
Initializes a new instance of the EnvironmentPermission class with the specified access to the specified environment variables.
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) to which access is granted.
| Exception | Condition |
|---|---|
| ArgumentNullException | The pathList parameter is null. |
| ArgumentException | The flag parameter is not a valid value of EnvironmentPermissionAccess. |
This constructor allows only one of the EnvironmentPermissionAccess values to be specified. This access applies to all listed environment variables. Use AddPathList to define complex permissions.
.NET Framework
Available since 1.1
Available since 1.1
Show: