See Also: CodeAccessSecurityAttribute Members
This attribute class associates a System.Security.Permissions.SecurityAction, for example, Demand, with a custom security attribute.
The types that derive from System.Security.Permissions.CodeAccessSecurityAttribute are used to help restrict 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 only for declarative security. Use the corresponding permission class derived from System.Security.CodeAccessPermission for imperative security.