System.Security.Permissions.EnvironmentPermission.GetPathList Method

Gets all environment variables with the specified System.Security.Permissions.EnvironmentPermissionAccess.

Syntax

public string GetPathList (EnvironmentPermissionAccess flag)

Parameters

flag
One of the System.Security.Permissions.EnvironmentPermissionAccess values that represents a single type of environment variable access.

Returns

A list of environment variables (semicolon-separated) for the selected flag.

Remarks

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 System.Security.Permissions.EnvironmentPermissionAccess, which represent single types of environment variable access. Those values are EnvironmentPermissionAccess.Read and EnvironmentPermissionAccess.Write. The values acceptable to flag do not include EnvironmentPermissionAccess.NoAccess and EnvironmentPermissionAccess.AllAccess, which do not represent single types of environment variable access.

Requirements

Namespace: System.Security.Permissions
Assembly: mscorlib (in mscorlib.dll)
Assembly Versions: 1.0.5000.0, 2.0.0.0, 4.0.0.0