mscorlib 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) System.Runtime.InteropServices.ComVisible(true)

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 security action.

  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. The metadata is created from the permission object 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.KeyContainerPermissionFlags To be added.

  Many of these flags are powerful and permit access to key containers that should be granted only to highly trusted code.

  The most powerful of the flags are , , , , , , and . For specific threats posed by the use of these flags, see individual flag descriptions.

  Gets or sets the key container permissions.

- Property
  2.0.0.0
  4.0.0.0
  System.String To be added.

  Use a value of "*" to apply the access entry to all key containers within the specified provider name and provider type.

  Gets or sets the name of the key container.

- Property
  2.0.0.0
  4.0.0.0
  System.Int32 To be added.

  If no value is specified, the AT_KEYEXCHANGE value (1) is used. Valid values for this property are AT_KEYEXCHANGE (1) and AT_SIGNATURE (2).

  Gets or sets the key specification.

- Property
  2.0.0.0
  4.0.0.0
  System.String To be added.

  Valid values are "User", "Machine", and "*". If null is specified, the value is set to "*".

  Gets or sets the name of the key store.

- Property
  2.0.0.0
  4.0.0.0
  System.String To be added.

  An example of a provider name is "Microsoft Enhanced Cryptographic Provider". If null is specified, the enhanced cryptographic provider name is used.

  Gets or sets the provider name.

- Property
  2.0.0.0
  4.0.0.0
  System.Int32 To be added.

  If no value is specified, PROV_RSA_FULL (1) is used.

  The following values are defined in the Wincrypt.h header file:

  #define PROV_RSA_FULL 1

  #define PROV_RSA_SIG 2

  #define PROV_DSS 3

  #define PROV_FORTEZZA 4

  #define PROV_MS_EXCHANGE 5

  #define PROV_SSL 6

  #define PROV_RSA_SCHANNEL 12

  #define PROV_DSS_DH 13

  #define PROV_EC_ECDSA_SIG 14

  #define PROV_EC_ECNRA_SIG 15

  #define PROV_EC_ECDSA_FULL 16

  #define PROV_EC_ECNRA_FULL 17

  #define PROV_DH_SCHANNEL 18

  #define PROV_SPYRUS_LYNKS 20

  #define PROV_RNG 21

  #define PROV_INTEL_SEC 22

  #define PROV_REPLACE_OWF 23

  #define PROV_RSA_AES 24

  Gets or sets the provider type.