See Also: CodeAccessPermission Members
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 null, it is handled the same as a permission object with the state System.Security.Permissions.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 System.Security.CodeAccessPermission class must be granted full trust to function correctly as permissions extending the security infrastructure. To determine that the inheritors are fully trusted, System.Security.CodeAccessPermission issues an System.Security.Permissions.SecurityAction.InheritanceDemand for System.Security.Permissions.SecurityPermissionFlag.ControlEvidence = true and System.Security.Permissions.SecurityPermissionFlag.ControlPolicy = true.
For more information on inheritance demands, see Inheritance Demands.