See Also: SecurityCriticalAttribute Members
Security-critical operations are actions that affect code access security, such as elevation of privilege through suppression of code access security checks by using the CodeAccessPermission.Assert method, calling unsafe managed code, and so forth. Either the System.Security.SecurityCriticalAttribute attribute or the System.Security.SecuritySafeCriticalAttribute attribute must be applied to code for the code to perform security-critical operations.
The System.Security.SecurityCriticalAttribute is equivalent to a link demand for full trust. A type or member marked with the System.Security.SecurityCriticalAttribute can be called only by fully trusted code; it does not have to demand specific permissions. It cannot be called by partially trusted code.
Applying the System.Security.SecurityCriticalAttribute at the assembly level identifies the assembly as a security-critical assembly. The entire assembly can be identified as critical by setting the scope parameter SecurityCriticalScope.Everything.