Edit

Share via


EnvironmentPermission.GetPathList(EnvironmentPermissionAccess) Method

Definition

Gets all environment variables with the specified EnvironmentPermissionAccess.

public:
 System::String ^ GetPathList(System::Security::Permissions::EnvironmentPermissionAccess flag);
public string GetPathList(System.Security.Permissions.EnvironmentPermissionAccess flag);
member this.GetPathList : System.Security.Permissions.EnvironmentPermissionAccess -> string
Public Function GetPathList (flag As EnvironmentPermissionAccess) As String

Parameters

flag
EnvironmentPermissionAccess

One of the EnvironmentPermissionAccess values that represents a single type of environment variable access.

Returns

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

Exceptions

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.

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 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.

Applies to