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


public sealed class FixedAddressValueTypeAttribute : Attribute


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.


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