GenerateSerializerAttribute.IncludePrimaryConstructorParameters 属性
定义
重要
一些信息与预发行产品相关,相应产品在发行之前可能会进行重大修改。 对于此处提供的信息,Microsoft 不作任何明示或暗示的担保。
获取或设置主构造函数参数是否应自动作为可序列化字段包含。
对于类型,默认 true
为 record
, false
否则为 。
public bool IncludePrimaryConstructorParameters { get; init; }
member this.IncludePrimaryConstructorParameters : bool with get, set
Public Property IncludePrimaryConstructorParameters As Boolean