Another option, for those who want to handle missing properties with meaningful exceptions:
using System;public class Car{ private string? name; private int? year; public string Name { get => this.name ?? throw new InvalidOperationException($"{nameof(this.Name)} was not set."); set => this.name = value; } public int Year { get => this.year ?? throw new InvalidOperationException($"{nameof(this.Year)} was not set."); set => this.year = value; }}