BizTalk Utilities CV ,   Jobs ,   Code library
 
Go to the front page to continue learning about XML or select below:

Contents

ReBlogger Contents

Previous posts in XmlSerializer

 
 
Page 8985 of 18325

Collection properties need a setter implementation when using DataContractSerializer

Blogger : Web Services
All posts : All posts by Web Services
Category : XmlSerializer
Blogged date : 2006 Oct 02

I was having a problem with serializing a FaultException that had a custom details class that was a collection. Today I figured out that, when using the DataContractSerializer, you need to make sure you provide a setter implementation even for your collection based properties. Once again, this is a departure from the way that the XmlSerializer works. I'm trying to work through the scenarios where this is any kind of improvement over XmlSerializer, but I cannot think of any problem this solves.

Welp, I hope this saves someone else some headscratching. I truly hope Microsoft lifts the restriction of only being able to serialize fault details with the DataContractSerializer... I'm just not a fan of it at all.


Read comments or post a reply to : Collection properties need a setter implementation when using DataContractSerializer
Page 8985 of 18325

Newest posts
 

    Email TopXML