Class InitLocalsAttribute
Used to configure the compiler behavior for zero-initialization of local variables of methods.
[AttributeUsage(AttributeTargets.Method)]
public class InitLocalsAttribute : Attribute
- Inheritance
-
InitLocalsAttribute
- Inherited Members
- Extension Methods
Constructors
InitLocalsAttribute(bool)
Initializes a new instance of the InitLocalsAttribute type with the specified value.
public InitLocalsAttribute(bool initLocals)
Parameters
initLocalsboolA boolean value indicating wheter the method marked with the InitLocalsAttribute attribute should include the
.locals initIL directive.
Properties
InitLocals
A boolean value indicating wheter the method marked with the InitLocalsAttribute attribute should include the .locals init IL directive. If this attribute is not applied, the default value true is used implicitly on all methods.
public bool InitLocals { get; set; }