3 ms·
Constructor-defined properties of records are implemented using auto-implemented properties with the new init keyword, so: public int MyProp { get; init; }
by Todd 6y ago
Constructor-defined properties of records are implemented using auto-implemented properties with the new init keyword, so:
public int MyProp { get; init; }
instead of
public int MyProp { get; set; }
Apparently those are implemented using readonly backing fields while still retaining property setters.