Breyta

Deila með


MetadataBuilder.AddTypeLayout(TypeDefinitionHandle, UInt16, UInt32) Method

Definition

Defines a type layout of a type definition.

public:
 void AddTypeLayout(System::Reflection::Metadata::TypeDefinitionHandle type, System::UInt16 packingSize, System::UInt32 size);
public void AddTypeLayout (System.Reflection.Metadata.TypeDefinitionHandle type, ushort packingSize, uint size);
member this.AddTypeLayout : System.Reflection.Metadata.TypeDefinitionHandle * uint16 * uint32 -> unit
Public Sub AddTypeLayout (type As TypeDefinitionHandle, packingSize As UShort, size As UInteger)

Parameters

type
TypeDefinitionHandle

The type definition.

packingSize
UInt16

Specifies that fields should be placed within the type instance at byte addresses which are a multiple of packingSize, or at natural alignment for that field type, whichever is smaller. Its value should be one of the following: 0, 1, 2, 4, 8, 16, 32, 64, or 128. A value of zero indicates that the packing size used should match the default for the current platform.

size
UInt32

Indicates a minimum size of the type instance and is intended to allow for padding. The amount of memory allocated is the maximum of the size calculated from the layout and size. Note that if this directive applies to a value type, then the size will be less than 1 MB.

Remarks

Entries must be added in the same order as the corresponding type definitions.

Applies to