Click to Rate and Give Feedback
MSDN
MSDN Library
.NET Development
.NET Framework 3.5

  Switch on low bandwidth view
This page is specific to
Microsoft Visual Studio 2008/.NET Framework 3.5

Other versions are also available for the following:
.NET Framework Class Library
SecurityCriticalAttribute Class

Updated: August 2008

Specifies that code or an assembly performs security-critical operations.

Namespace:  System.Security
Assembly:  mscorlib (in mscorlib.dll)
Visual Basic (Declaration)
<AttributeUsageAttribute(AttributeTargets.Assembly Or AttributeTargets.Module Or AttributeTargets.Class Or AttributeTargets.Struct Or AttributeTargets.Enum Or AttributeTargets.Constructor Or AttributeTargets.Method Or AttributeTargets.Property Or AttributeTargets.Field Or AttributeTargets.Event Or AttributeTargets.Interface Or AttributeTargets.Delegate, AllowMultiple := False,  _
    Inherited := False)> _
Public NotInheritable Class SecurityCriticalAttribute _
    Inherits Attribute
Visual Basic (Usage)
Dim instance As SecurityCriticalAttribute
C#
[AttributeUsageAttribute(AttributeTargets.Assembly|AttributeTargets.Module|AttributeTargets.Class|AttributeTargets.Struct|AttributeTargets.Enum|AttributeTargets.Constructor|AttributeTargets.Method|AttributeTargets.Property|AttributeTargets.Field|AttributeTargets.Event|AttributeTargets.Interface|AttributeTargets.Delegate, AllowMultiple = false, 
    Inherited = false)]
public sealed class SecurityCriticalAttribute : Attribute
Visual C++
[AttributeUsageAttribute(AttributeTargets::Assembly|AttributeTargets::Module|AttributeTargets::Class|AttributeTargets::Struct|AttributeTargets::Enum|AttributeTargets::Constructor|AttributeTargets::Method|AttributeTargets::Property|AttributeTargets::Field|AttributeTargets::Event|AttributeTargets::Interface|AttributeTargets::Delegate, AllowMultiple = false, 
    Inherited = false)]
public ref class SecurityCriticalAttribute sealed : public Attribute
JScript
public final class SecurityCriticalAttribute extends 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 SecurityCriticalAttribute attribute or the SecuritySafeCriticalAttribute attribute must be applied to code for the code to perform security-critical operations.

Applying the SecurityCriticalAttribute at the assembly level identifies it as a security-critical assembly. The entire assembly can be identified as critical by setting the scope parameter Everything.

System..::.Object
  System..::.Attribute
    System.Security..::.SecurityCriticalAttribute
Any public static (Shared in Visual Basic) members of this type are thread safe. Any instance members are not guaranteed to be thread safe.

Windows 7, Windows Vista, Windows XP SP2, Windows XP Media Center Edition, Windows XP Professional x64 Edition, Windows XP Starter Edition, Windows Server 2008 R2, Windows Server 2008, Windows Server 2003, Windows Server 2000 SP4, Windows Millennium Edition, Windows 98

The .NET Framework and .NET Compact Framework do not support all versions of every platform. For a list of the supported versions, see .NET Framework System Requirements.

.NET Framework

Supported in: 3.5, 3.0, 2.0

Date

History

Reason

August 2008

Updated Remarks to include the new SecuritySafeCriticalAttribute.

Information enhancement.

Tags What's this?: Add a tag
Community Content   What is Community Content?
Add new content RSS  Annotations
Processing
© 2009 Microsoft Corporation. All rights reserved. Terms of Use  |  Trademarks  |  Privacy Statement
Page view tracker