Share via


Size Field

[This documentation is for preview only, and is subject to change in later releases. Blank topics are included as placeholders.]

Indicates the absolute size of the class or structure.

Namespace:  System.Runtime.InteropServices
Assembly:  mscorlib (in mscorlib.dll)

Syntax

'Declaration
Public Size As Integer
public int Size
public:
int Size
val mutable Size: int
public var Size : int

Remarks

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.

.NET Framework Security

See Also

Reference

StructLayoutAttribute Class

System.Runtime.InteropServices Namespace