System.Runtime.CompilerServices.FixedAddressValueTypeAttribute Class

Fixes the address of a static value type field throughout its lifetime. This class cannot be inherited.

See Also: FixedAddressValueTypeAttribute Members

Syntax

[System.AttributeUsage(System.AttributeTargets.Field)]
public sealed class FixedAddressValueTypeAttribute : Attribute

Remarks

Use the System.Runtime.CompilerServices.FixedAddressValueTypeAttribute attribute to mark static value types as pinned upon creation.

This attribute is used by the Microsoft Visual C++ compiler.

Static value type fields are created as boxed objects. This means that their address can change as garbage collection is performed. When you apply this attribute to a static value type, its address remains constant during its lifetime.

Requirements

Namespace: System.Runtime.CompilerServices
Assembly: mscorlib (in mscorlib.dll)
Assembly Versions: 2.0.0.0, 4.0.0.0
Since: .NET 2.0