Specifies that code or an assembly performs security-critical operations.
Assembly: mscorlib (in mscorlib.dll)
'Declaration <AttributeUsageAttribute(AttributeTargets.Assembly Or AttributeTargets.Class Or AttributeTargets.Struct Or AttributeTargets.Enum Or AttributeTargets.Constructor Or AttributeTargets.Method Or AttributeTargets.Field Or AttributeTargets.Interface Or AttributeTargets.Delegate, AllowMultiple := False, _ Inherited := False)> _ Public NotInheritable Class SecurityCriticalAttribute _ Inherits Attribute
Thetype exposes the following members.
|Equals||Infrastructure. Returns a value that indicates whether this instance is equal to a specified object. (Inherited from Attribute.)|
|GetHashCode||Returns the hash code for this instance. (Inherited from Attribute.)|
|GetType||Gets the Type of the current instance. (Inherited from Object.)|
|ToString||Returns a string that represents the current object. (Inherited from Object.)|
|_Attribute.GetIDsOfNames||Maps a set of names to a corresponding set of dispatch identifiers. (Inherited from Attribute.)|
|_Attribute.Invoke||Provides access to properties and methods exposed by an object. (Inherited from Attribute.)|
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 Assert method, calling unsafe managed code, and so forth. Either the attribute or the SecuritySafeCriticalAttribute attribute must be applied to code for the code to perform security-critical operations.
The is equivalent to a link demand for full trust. A type or member marked with the 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 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.