StructLayoutAttribute.Size StructLayoutAttribute.Size StructLayoutAttribute.Size StructLayoutAttribute.Size Field

定义

指示类或结构的绝对大小。Indicates the absolute size of the class or structure.

public: int Size;
public int Size;
val mutable Size : int
Public Size As Integer 

字段值

注解

此字段必须为等于或大于总大小,以字节为单位的类或结构的成员。This field must be equal or greater than the total size, in bytes, of the members of the class or structure. 此字段是主要,编译器编写器要扩展的非托管、 可直接访问结构占用的内存。This field is primarily for compiler writers who want to extend the memory occupied by a structure for direct, unmanaged access. 例如,可以使用此字段时使用不直接表示元数据中的联合。For example, you can use this field when working with unions that are not represented in metadata directly.

适用于