class · System.Runtime.InteropServices
ValueLayoutAttribute
public class System.Runtime.InteropServices.ValueLayoutAttribute : System.Attribute
[ValueLayout(Layout.Explicit, Size = 128)], [ValueLayout(Layout.Sequential, Pack = 1)] on a value: its
fields where C would put them, for structs and unions that cross to C by pointer. The fields hold numbers, bools,
pointers, func*, inline arrays and other such values (no objects); reading or writing one is unsafe memory
access, so the value is meant for interop.
- Kind
- class
- Namespace
- System.Runtime.InteropServices
- Assembly
- System.Core
- Access
- public, final
- Source file
Interop.ant
Inheritance
Constructors
constructor ValueLayoutAttribute(kind: System.Runtime.InteropServices.Layout)
#
Fields
field Kind: System.Runtime.InteropServices.Layout
#
Sequential or explicit.
The largest alignment a field gets (1, 2, 4, 8 or 16; 0: each field's own).
The value's size in bytes when it must be larger than its fields (0: what the fields need).
Inherited members (5)
GetTypemethod from AnyUndescribedmethod from AnyToStringmethod from AnyHashmethod from Anydestroymethod from Any
Source
ValueLayoutAttribute as Larva HIR, decompiled from its Larva HIR.
// `[ValueLayout(Layout.Explicit, Size = 128)]`, `[ValueLayout(Layout.Sequential, Pack = 1)]` on a `value`: its
// fields where C would put them, for structs and unions that cross to C by pointer. The fields hold numbers, bools,
// pointers, `func*`, inline arrays and other such values (no objects); reading or writing one is unsafe memory
// access, so the value is meant for interop.
public class System.Runtime.InteropServices.ValueLayoutAttribute : System.Attribute
{
// Sequential or explicit.
field Kind: System.Runtime.InteropServices.Layout
// The largest alignment a field gets (1, 2, 4, 8 or 16; 0: each field's own).
field Pack: i32
// The value's size in bytes when it must be larger than its fields (0: what the fields need).
field Size: i32
constructor ValueLayoutAttribute(kind: System.Runtime.InteropServices.Layout)
}