Comment on Typing is not a programming bottleneck
CatPoop@lemmy.world 1 year ago
Assuming this is C#, you could just make Reservation a record type, which can be defined with a one line primary constructor, is immutable and has value type equality. Second example is an insane amount of boilerplate.
copygirl@lemmy.blahaj.zone 1 year ago
And you can use the
with
expression to create clones of the object with some properties modified.