System.Security 2.0.0.0 4.0.0.0 System.Security.Permissions.CodeAccessSecurityAttribute System.AttributeUsage(System.AttributeTargets.Assembly | System.AttributeTargets.Class | System.AttributeTargets.Struct | System.AttributeTargets.Constructor | System.AttributeTargets.Method | System.AttributeTargets.All, AllowMultiple=true, Inherited=false)

The scope of the declaration that is allowed depends on the value that is used.

The security information declared by a security attribute is stored in the metadata of the attribute target and is accessed by the system at run time. is used only for declarative security. For imperative security, use the class.

Allows security actions for to be applied to code using declarative security. This class cannot be inherited.

- Constructor
  2.0.0.0
  4.0.0.0
  To be added.

  Initializes a new instance of the class with the specified .

  One of the values.
- Method
  2.0.0.0
  4.0.0.0
  System.Security.IPermission

  This method should only be called by the security system, never by application code.

  At compile time, attributes convert security declarations to a serialized form in metadata. Declarative security data in metadata is created from the permission that this method returns.

  Creates and returns a new .

  A that corresponds to the attribute.

- Property
  2.0.0.0
  4.0.0.0
  System.Security.Permissions.DataProtectionPermissionFlags To be added. To be added.

  Gets or sets the data protection permissions.

- Property
  2.0.0.0
  4.0.0.0
  System.Boolean To be added.

  If the value is false, a occurs when the method is called.

  Gets or sets a value indicating whether data can be encrypted using the class.

- Property
  2.0.0.0
  4.0.0.0
  System.Boolean To be added.

  If the value is false, a occurs when the method is called.

  Gets or sets a value indicating whether memory can be encrypted using the class.

- Property
  2.0.0.0
  4.0.0.0
  System.Boolean To be added.

  If this value is false, a occurs when the method is called.

  Gets or sets a value indicating whether data can be unencrypted using the class.

- Property
  2.0.0.0
  4.0.0.0
  System.Boolean To be added.

  If this value is false, a occurs when the method is called.

  Gets or sets a value indicating whether memory can be unencrypted using the class.