System.Security.Permissions.CodeAccessSecurityAttribute Class
This is the base class for code access security attributes.

See Also: CodeAccessSecurityAttribute Members

Syntax

[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)]
public abstract class CodeAccessSecurityAttribute : SecurityAttribute

Remarks

Note:

The types that derive from System.Security.Permissions.CodeAccessSecurityAttribute are used to secure access to resources or securable operations.

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. Security attributes are used for declarative security only. Use the corresponding permission class derived from System.Security.CodeAccessPermission for imperative security.

Thread Safety

All public static members of this type are safe for multithreaded operations. No instance members are guaranteed to be thread safe.

Requirements

Namespace: System.Security.Permissions
Assembly: mscorlib (in mscorlib.dll)
Assembly Versions: 1.0.5000.0, 2.0.0.0, 4.0.0.0