XML serialization of a collection in C#

NameValueCollection does not directly implement the ICollection interface. Instead, NameValueCollection extends NameObjectCollectionBase. This implements the ICollection interface, and the overloaded Add(system.string) method is not implemented in the NameValueCollection class. When you use the XMLSerializer, the XmlSerializer tries to serialize or deserialize the NameValueCollection as a generic ICollection. Therefore, it looks for the default Add(System.String). In the absence of the Add(system.String) method, the exception is thrown.

Try using a container class with custom serialization:

http://nayyeri.net/serialize-namevaluecollection

However, I am unsure what you are actually trying to achieve. What will the nvcollection contain except for the author of the book and the price, once?

Do you intend to use it at the Book level, or higher in the object hierarchy?

Instead of using a NameValueCollection, you might want to a Dictionary as it has more flexibility in terms of what it can contain: http://johnwsaundersiii.spaces.live.com/blog/cns!600A2BE4A82EA0A6!699.entry