Composite types are user-defined data layouts. They consist of fields that can be either primitive types or other composite types.
struct Point
{
public int X;
public int Y;
}-
Layout:
Fields are laid out in memory in the order of their declaration
-
Size:
The size of a
structis the sum of the sizes of its fields plus any necessary padding for alignment -
Value Semantics:
By default,
struct's are passed by copy unless a any reference is used