EnvironmentPermission::SetPathList Method (EnvironmentPermissionAccess, String^)

 

Sets the specified access to the specified environment variables to the existing state of the permission.

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

public:
void SetPathList(
	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).

Exception Condition
ArgumentNullException

The pathList parameter is null.

ArgumentException

The flag parameter is not a valid value of EnvironmentPermissionAccess.

The previous state of the current permission is overwritten.

The following code example shows the use of the SetPathList method. This code example is part of a larger example provided for the EnvironmentPermission class.

No code example is currently available or this language may not be supported.

.NET Framework
Available since 1.1
Return to top
Show: