EnvironmentPermission Constructor (EnvironmentPermissionAccess, String)

 

Initializes a new instance of the EnvironmentPermission class with the specified access to the specified environment variables.

Namespace:   System.Security.Permissions
Assembly:  mscorlib (in mscorlib.dll)

public EnvironmentPermission(
	EnvironmentPermissionAccess flag,
	string pathList
)

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
Return to top
Show: