What's new in C# 9.0 - C# Guide
Init only setters are a way to specify a property to be required to be set at initialization and not after, for example (per microsoft):
public struct WeatherObservation
{
public DateTime RecordedAt { get; init; }
public decimal TemperatureInCelsius { get; init; }
public decimal PressureInMillibars { get; init; }
public override string ToString() =>
$"At {RecordedAt:h:mm tt} on {RecordedAt:M/d/yyyy}: " +
$"Temp = {TemperatureInCelsius}, with {PressureInMillibars} pressure";
}
changing any of these properties after the initialization will throw an error