EnvironmentPermission::GetPathList Method (EnvironmentPermissionAccess)
Gets all environment variables with the specified EnvironmentPermissionAccess.
Assembly: mscorlib (in mscorlib.dll)
Parameters
- flag
-
Type:
System.Security.Permissions::EnvironmentPermissionAccess
One of the EnvironmentPermissionAccess values that represents a single type of environment variable access.
Return Value
Type: System::String^A list of environment variables (semicolon-separated) for the selected flag.
| Exception | Condition |
|---|---|
| ArgumentException | flag is not a valid value of EnvironmentPermissionAccess. -or- flag is AllAccess, which represents more than one type of environment variable access, or NoAccess, which does not represent any type of environment variable access. |
Use this method to get the state of the current permission. To get both Read and Write access states requires two calls to this method.
Note |
|---|
The flag parameter is limited to the values of EnvironmentPermissionAccess, which represent single types of environment variable access. Those values are Read and Write. The values acceptable to flag do not include NoAccess and AllAccess, which do not represent single types of environment variable access. |
The following code example shows the use of the GetPathList method. This code example is part of a larger example provided for the EnvironmentPermission class.
Available since 1.1
