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.

Tipo
class
Espacio de nombres
System.Runtime.InteropServices
Ensamblado
System.Core
Acceso
public, final
Archivo fuente
Interop.ant

Herencia

Clases base
Any Attribute ValueLayoutAttribute

Constructores

constructor ValueLayoutAttribute(kind: System.Runtime.InteropServices.Layout)
#

Campos

Sequential or explicit.

field Pack: i32
#

The largest alignment a field gets (1, 2, 4, 8 or 16; 0: each field's own).

field Size: i32
#

The value's size in bytes when it must be larger than its fields (0: what the fields need).

Miembros heredados (5)

Código fuente

ValueLayoutAttribute en Larva HIR, descompilado a partir de su Larva HIR.

System.Runtime.InteropServices.ValueLayoutAttribute.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)
}
Esc