In the code you posted, the type of CustomerAddresses
is IList<CustomerAdress>
. That’s an interface. Like the error message says, you can’t serialize an interface.
More Related Contents:
- Why XML-Serializable class need a parameterless constructor
- Convert XML String to Object
- Omitting all xsi and xsd namespaces when serializing an object in .NET?
- Using XmlSerializer to serialize derived classes
- XML Serialize generic list of serializable objects
- Can I make XmlSerializer ignore the namespace on deserialization?
- Most elegant XML serialization of Color structure
- Why are properties without a setter not serialized
- Deserializing into a List without a container element in XML
- .NET XML serialization gotchas? [closed]
- Force XmlSerializer to serialize DateTime as ‘YYYY-MM-DD hh:mm:ss’
- When a class is inherited from List, XmlSerializer doesn’t serialize other attributes
- How can I make the xmlserializer only serialize plain xml?
- How to XML-serialize a dictionary
- XmlSerializer serialize generic List of interface
- Why doesn’t the XmlSerializer need the type to be marked [Serializable]?
- How can I serialize internal classes using XmlSerializer?
- How to write a comment to an XML file when using the XmlSerializer?
- Suppress Null Value Types from Being Emitted by XmlSerializer
- Checking if an object is a number in C#
- using XmlArrayItem attribute without XmlArray on Serializable C# class
- FileMode.Open and FileMode.OpenOrCreate difference when file exists? c# bug?
- Generating XML file using XSD file
- How can I transform XML into a List or String[]?
- Cloning objects without Serialization
- Serializing a Nullable in to XML
- Using XmlSerializer with an array in the root element
- How to deserialize only part of an XML document in C#
- How do you use XMLSerialize for Enum typed properties in c#?
- XmlSerializer property converter