<PackageReference Include="System.Xml.XmlSerializer" Version="4.0.11-beta-23409" />

XmlTypeAttribute

public class XmlTypeAttribute : Attribute
Controls the XML schema that is generated when the attribute target is serialized by the XmlSerializer.
public bool AnonymousType { get; set; }

Gets or sets a value that determines whether the resulting schema type is an XSD anonymous type.

public bool IncludeInSchema { get; set; }

Gets or sets a value that indicates whether to include the type in XML schema documents.

public string Namespace { get; set; }

Gets or sets the namespace of the XML type.

public string TypeName { get; set; }

Gets or sets the name of the XML type.

Initializes a new instance of the XmlTypeAttribute class.

public XmlTypeAttribute(string typeName)

Initializes a new instance of the XmlTypeAttribute class and specifies the name of the XML type.