关于[Introducing C# 11: Required properties]的摘要:
C# 11 improves the initialization of objects and struct. Marking one or more properties as mandatory on initialization is now possible and will help you not to forget to initialize your properties correctly. In this post I will show you how it works with the object initializer syntax and the object instantiation with a constructor.
原文地址: https://anthonygiretti.com/2022/12/02/introducing-c11-required-properties/