<PackageReference Include="System.Runtime.Serialization.Primitives" Version="4.0.11-beta-23409" />

DataMemberAttribute

public sealed class DataMemberAttribute : Attribute
When applied to the member of a type, specifies that the member is part of a data contract and is serializable by the DataContractSerializer.
public bool EmitDefaultValue { get; set; }

Gets or sets a value that specifies whether to serialize the default value for a field or property being serialized.

public bool IsNameSetExplicitly { get; }

public bool IsRequired { get; set; }

Gets or sets a value that instructs the serialization engine that the member must be present when reading or deserializing.

public string Name { get; set; }

Gets or sets a data member name.

public int Order { get; set; }

Gets or sets the order of serialization and deserialization of a member.

Initializes a new instance of the DataMemberAttribute class.