Defines the underlying structure of all code access permissions.
For a list of all members of this type, see CodeAccessPermission Members.
System.Object
System.Security.CodeAccessPermission
Derived classes
[Visual Basic] <Serializable> MustInherit Public Class CodeAccessPermission Implements IPermission, ISecurityEncodable, IStackWalk [C#] [Serializable] public abstract class CodeAccessPermission : IPermission, ISecurityEncodable, IStackWalk [C++] [Serializable] public __gc __abstract class CodeAccessPermission : public IPermission, ISecurityEncodable, IStackWalk [JScript] public Serializable abstract class CodeAccessPermission implements IPermission, ISecurityEncodable, IStackWalk
Any public static (Shared in Visual Basic) members of this type are safe for multithreaded operations. Any instance members are not guaranteed to be thread safe.
Code access permissions use a stack walk to ensure that all callers of the code have been granted a permission. If a permission object is a null reference (Nothing in Visual Basic), it is handled the same as a permission object with the state PermissionState.None.
The call stack is typically represented as growing down, so that methods higher in the call stack call methods lower in the call stack.
Inheritors of the CodeAccessPermission class must be granted full trust to function correctly as permissions extending the security infrastructure. To determine that the inheritors are fully trusted, CodeAccessPermission issues an InheritanceDemand for ControlEvidence = True and ControlPolicy = True.
For more information on inheritance demands, see
Notes to Inheritors: When you inherit from CodeAccessPermission, you must override the following members: Copy, Intersect, IsSubsetOf, ToXml, FromXml, and Union. You must also define a constructor that takes a PermissionState as its only parameter.
Namespace: System.Security
Platforms: Windows 98, Windows NT 4.0, Windows Millennium Edition, Windows 2000, Windows XP Home Edition, Windows XP Professional, Windows Server 2003 family
Assembly: Mscorlib (in Mscorlib.dll)
.NET Framework Security:
CodeAccessPermission Members | System.Security Namespace |