Gets all environment variables with the specified System.Security.Permissions.EnvironmentPermissionAccess.
- flag
- One of the System.Security.Permissions.EnvironmentPermissionAccess values that represents a single type of environment variable access.
A list of environment variables (semicolon-separated) for the selected flag.
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.
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.