DynamicMethod::InitLocals Property
.NET Framework (current version)
Gets or sets a value indicating whether the local variables in the method are zero-initialized.
Assembly: mscorlib (in mscorlib.dll)
Property Value
Type: System::Booleantrue if the local variables in the method are zero-initialized; otherwise, false. The default is true.
If this property is set to true, the emitted Microsoft intermediate language (MSIL) includes initialization of local variables. If it is set to false, local variables are not initialized and the generated code is unverifiable.
The following code example displays the InitLocals property of a dynamic method. This code example is part of a larger example provided for the DynamicMethod class.
.NET Framework
Available since 2.0
Portable Class Library
Supported in: portable .NET platforms
Silverlight
Available since 2.0
Windows Phone Silverlight
Available since 7.1
Available since 2.0
Portable Class Library
Supported in: portable .NET platforms
Silverlight
Available since 2.0
Windows Phone Silverlight
Available since 7.1
Show: