XmlAttribute / XmlElement in Interface (Element Name not changed when Serialized) - Why?
问题 When I add an "XmlAttribute/XmlElement" to a property in an Interface and 100 other classes inherit from this interface, when Serializing the object to XML - why doesn't the attributename I entered show up in the XML file after serialization? interface Test { [XmlAttribute("Name")] bool PropertyName { get; set; } } when saving the file, is shows "PropertyName" and not "Name". Is there any way to make it work, so a proeprty with an XmlAttributes added to an interface changes the Value