Unable to Serializing ICollection<T>

Coordinator
Sep 17, 2012 at 1:31 PM

Because of limitation with the Xml Serializer I am not able to serialize classes that contains ICollection<T>.

Since it is very common to have classes with ICollection<T> I would like to dynamically change that type to a List<T> at run time for me to be able to serialize to xml.

I have a post on stackoverflow (http://stackoverflow.com/questions/12432619/how-to-serialize-icollectiont-as-listt-to-xml) about this topic.

I am not sure where to go from here, so far I have been unable to do that conversion at runtime. 

Any ideas?

Coordinator
Feb 13, 2013 at 7:27 PM
I solved this issue by using Newton.Json to serialize the object instead of trying to serialize with xml.