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

XmlElementAttribute

Indicates that a public field or property represents an XML element when the XmlSerializer serializes or deserializes the object that contains it.
public string DataType { get; set; }

Gets or sets the XML Schema definition (XSD) data type of the XML element generated by the XmlSerializer.

public string ElementName { get; set; }

Gets or sets the name of the generated XML element.

public XmlSchemaForm Form { get; set; }

Gets or sets a value that indicates whether the element is qualified.

public bool IsNullable { get; set; }

Gets or sets a value that indicates whether the XmlSerializer must serialize a member that is set to null as an empty tag with the xsi:nil attribute set to true.

public string Namespace { get; set; }

Gets or sets the namespace assigned to the XML element that results when the class is serialized.

public int Order { get; set; }

Gets or sets the explicit order in which the elements are serialized or deserialized.

public Type Type { get; set; }

Gets or sets the object type used to represent the XML element.

Initializes a new instance of the XmlElementAttribute class.

public XmlElementAttribute(string elementName)

Initializes a new instance of the XmlElementAttribute class and specifies the name of the XML element.

Initializes a new instance of the XmlElementAttribute class and specifies a type for the member to which the XmlElementAttribute is applied. This type is used by the XmlSerializer when serializing or deserializing object that contains it.

public XmlElementAttribute(string elementName, Type type)

Initializes a new instance of the XmlElementAttribute and specifies the name of the XML element and a derived type for the member to which the XmlElementAttribute is applied. This member type is used when the XmlSerializer serializes the object that contains it.