SkipLocalsInitAttribute Class
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
Indicates to the compiler that the .locals init flag should not be set in nested method headers when emitting to metadata.
public ref class SkipLocalsInitAttribute sealed : Attribute
[System.AttributeUsage(System.AttributeTargets.Class | System.AttributeTargets.Constructor | System.AttributeTargets.Event | System.AttributeTargets.Interface | System.AttributeTargets.Method | System.AttributeTargets.Module | System.AttributeTargets.Property | System.AttributeTargets.Struct, Inherited=false)]
public sealed class SkipLocalsInitAttribute : Attribute
[<System.AttributeUsage(System.AttributeTargets.Class | System.AttributeTargets.Constructor | System.AttributeTargets.Event | System.AttributeTargets.Interface | System.AttributeTargets.Method | System.AttributeTargets.Module | System.AttributeTargets.Property | System.AttributeTargets.Struct, Inherited=false)>]
type SkipLocalsInitAttribute = class
inherit Attribute
Public NotInheritable Class SkipLocalsInitAttribute
Inherits Attribute
- Inheritance
- Attributes
Remarks
This attribute is unsafe, because it may reveal uninitialized memory to the application in certain instances (for example, reading from uninitialized stack-allocated memory). If applied to a method directly, the attribute applies to that method and all its nested functions, including lambdas and local functions. If applied to a type or module, it applies to all methods nested inside. This attribute is intentionally not permitted on assemblies. To apply the attribute to multiple type declarations, use it at the module level instead.
Constructors
SkipLocalsInitAttribute() |
Initializes a new instance of the SkipLocalsInitAttribute class. |
Properties
TypeId |
When implemented in a derived class, gets a unique identifier for this Attribute. (Inherited from Attribute) |
Methods
Equals(Object) |
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) |
IsDefaultAttribute() |
When overridden in a derived class, indicates whether the value of this instance is the default value for the derived class. (Inherited from Attribute) |
Match(Object) |
When overridden in a derived class, returns a value that indicates whether this instance equals a specified object. (Inherited from Attribute) |
MemberwiseClone() |
Creates a shallow copy of the current Object. (Inherited from Object) |
ToString() |
Returns a string that represents the current object. (Inherited from Object) |