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

XmlEnumAttribute

public class XmlEnumAttribute : Attribute
Controls how the XmlSerializer serializes an enumeration member.
public string Name { get; set; }

Gets or sets the value generated in an XML-document instance when the XmlSerializer serializes an enumeration, or the value recognized when it deserializes the enumeration member.

Initializes a new instance of the XmlEnumAttribute class.

public XmlEnumAttribute(string name)

Initializes a new instance of the XmlEnumAttribute class, and specifies the XML value that the XmlSerializer generates or recognizes (when it serializes or deserializes the enumeration, respectively).