using XmlArrayItem attribute without XmlArray on Serializable C# class
The following should serialize properly the way you want. The clue being [XmlElement(“credentials”)] on the list. I did this by taking your xml, generating a schema (xsd) from it in Visual Studio. Then running xsd.exe on the schema to generate a class. (And some small edits) public class CredentialsSection { public string Username { get; … Read more