你的位置: 码友网首页 / 资讯源列表 / Introducing C# 11: Required properties

关于[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/

收录时间: 2022-12-03 浏览量: 1095 分类: C#

| 0 收藏 | 0