BCL mscorlib [00 00 00 00 00 00 00 00 04 00 00 00 00 00 00 00 ] 1.0.5000.0 2.0.0.0 4.0.0.0 All public static members of this type are safe for multithreaded operations. No instance members are guaranteed to be thread safe. System.Security.CodeAccessPermission System.Security.Permissions.IBuiltInPermission System.Security.Permissions.IUnrestrictedPermission System.Runtime.InteropServices.ComVisible(true)

Environment variable names are designated by one or more case-insensitive name lists separated by semicolons, with separate lists for read and write access to the named variables. Write access includes the ability to create and delete environment variables as well as to change existing values.

In versions of the .NET Framework before the net_v40_long, you could use the method to prevent inadvertent access to system resources by trusted code. is now obsolete, and access to resources is now determined solely by the granted permission set for an assembly. To limit access to files, you must run partially trusted code in a sandbox and assign it permissions only to resources that the code is allowed to access. For information about running an application in a sandbox, see How To: Run Partially Trusted Code in a Sandbox.

Controls access to system and user environment variables. This class cannot be inherited.

- Constructor
  1.0.5000.0
  2.0.0.0
  4.0.0.0
  is not a valid value.

  Creates either fully restricted (None) or Unrestricted access to all environment variables.

  Initializes a new instance of the class with either restricted or unrestricted permission as specified.

  One of the values.
  0
- Constructor
  1.0.5000.0
  2.0.0.0
  4.0.0.0

  is .

  specifies a value not defined in .

  This constructor allows only one of the values to be specified. This access applies to all listed environment variables. Use to define complex permissions.

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

  One of the values.
  A list of environment variables (semicolon-separated) to which access is granted.
  0
- Method
  1.0.5000.0
  2.0.0.0
  4.0.0.0
  System.Void `` ``

  Use this method to modify environment variable access by adding to the state of the current permission.

  Adds access for the specified environment variables to the existing state of the permission.

  One of the values. A list of environment variables (semicolon-separated).
- Method
  1.0.5000.0
  2.0.0.0
  4.0.0.0
  System.Security.IPermission

  A copy of a permission represents the same access to resources as the original permission.

  Creates and returns an identical copy of the current permission.

  A copy of the current permission.

  0
- Method
  1.0.5000.0
  2.0.0.0
  4.0.0.0
  System.Void ``

  The state of the current instance is changed to the state encoded in .

  For the XML encoding for this class, see the class page.

  This method overrides .

  is .

  does not contain the encoding for a instance.

  The version number of is not valid.

  Reconstructs a permission with a specified state from an XML encoding.

  The XML encoding to use to reconstruct the permission. 0
- Method
  1.0.5000.0
  2.0.0.0
  4.0.0.0
  System.String ``

  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 parameter is limited to the values of , which represent single types of environment variable access. Those values are and . The values acceptable to do not include and , which do not represent single types of environment variable access.

  Gets all environment variables with the specified .

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

  One of the values that represents a single type of environment variable access.
- Method
  1.0.5000.0
  2.0.0.0
  4.0.0.0
  System.Security.IPermission `` is not and is not of type .

  The intersection of two permissions is a permission that describes the state they both describe in common. Only a demand that passes both original permissions will pass the intersection.

  Creates and returns a permission that is the intersection of the current permission and the specified permission.

  A new permission that represents the intersection of the current permission and the specified permission. This new permission is null if the intersection is empty.

  A permission to intersect with the current permission. It must be of the same type as the current permission. 0
- Method
  1.0.5000.0
  2.0.0.0
  4.0.0.0
  System.Boolean `` is not and is not of type .

  The current permission is a subset of the specified permission if the current permission specifies a state that is wholly contained by the specified permission. For example, a permission that represents access to C:\example.txt is a subset of a permission that represents access to C:\. If this method returns true, the current permission represents no more access to the protected resource than does the specified permission.

  Determines whether the current permission is a subset of the specified permission.

  true if the current permission is a subset of the specified permission; otherwise, false.

  A permission that is to be tested for the subset relationship. This permission must be of the same type as the current permission. 0
- Method
  1.0.5000.0
  2.0.0.0
  4.0.0.0
  System.Boolean

  An unrestricted permission represents the union of all possible states of the permission.

  Returns a value indicating whether the current permission is unrestricted.

  true if the current permission is unrestricted; otherwise, false.

- Method
  1.0.5000.0
  2.0.0.0
  4.0.0.0
  System.Void `` ``

  The previous state of the current permission is overwritten.

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

  One of the values. A list of environment variables (semicolon-separated).
- Method
  1.0.5000.0
  2.0.0.0
  4.0.0.0
  System.Int32 To be added. To be added. To be added.
- Method
  1.0.5000.0
  2.0.0.0
  4.0.0.0
  System.Security.SecurityElement

  For the XML encoding for this class, see the class page.

  This method overrides .

  Creates an XML encoding of the permission and its current state.

  An XML encoding of the permission, including any state information.

  0
- Method
  1.0.5000.0
  2.0.0.0
  4.0.0.0
  System.Security.IPermission `` is not and is not of type .

  The result of a call to is a permission that represents all the states represented by both the current permission and the specified permission. Any demand that passes either permission passes their union.

  Creates a permission that is the union of the current permission and the specified permission.

  A new permission that represents the union of the current permission and the specified permission.

  A permission to combine with the current permission. It must be of the same type as the current permission. 0
0