Partager via


LocalBuilder.IsPinned Property

Microsoft Silverlight will reach end of support after October 2021. Learn more.

Gets a value indicating whether the object referred to by the local variable is pinned in memory.

Namespace:  System.Reflection.Emit
Assembly:  mscorlib (in mscorlib.dll)

Syntax

'Declaration
Public Overrides ReadOnly Property IsPinned As Boolean
public override bool IsPinned { get; }

Property Value

Type: System.Boolean
true if the object referred to by the local variable is pinned in memory; otherwise, false.

Remarks

In unsafe code, an object must be pinned before it can be referred to by an unmanaged pointer. While the referenced object is pinned, it cannot be moved by garbage collection.

Version Information

Silverlight

Supported in: 5, 4, 3

Silverlight for Windows Phone

Supported in: Windows Phone OS 7.1

Platforms

For a list of the operating systems and browsers that are supported by Silverlight, see Supported Operating Systems and Browsers.