Custom Element Names using the DataContractSerializer on a List of primitives
问题 I'm interested about the best way to go about setting custom element names when using List of primitives with the DataContractSerializer. Let's say I have the following class which contains a List of Strings as a DataMember. [DataContract] public class ClassName { [DataMember] public List<String> FieldName { get; set; } } By default, this serializes to the following: <ClassName xmlns:i="http://www.w3.org/2001/XMLSchema-instance"> <FieldName xmlns:a="http://schemas.microsoft.com/2003/10