3 ms·
Record types introduced in C# 9 solves this. It's now as simple as record SomeData(string Name, int Id); Which gives you an immutable object, auto generated
by hakanderyal 3y ago
Record types introduced in C# 9 solves this.
It's now as simple as
record SomeData(string Name, int Id);
Which gives you an immutable object, auto generated constructor, and some additional helpers to make life easier.