record struct

A record declared as a value type, with the same generated members but copied by value and not allocated on the heap.

In more detail

It is declared with record struct, optionally readonly, instead of plain record. It fits small values with no identity, such as readonly record struct Money(decimal Amount, string Currency).

Related terms

Taught in

References