views:

22

answers:

0

Framework Design Guidelines gives this advice: DO NOT provide settable collection properties.

But if I don't, I can't see a way to XML serialize anything with a collection property. The XmlSerializer constructor complains,

"Unable to generate a temporary class (result=1). error CS0200: Property or indexer 'ConsoleApplication1.MyClass.Clxn' cannot be assigned to -- it is read only"

And this is exactly what I'd expect. So did the FDG authors just not consider this or am I missing a better practice?