The way I see it, the issue isn't supporting a fluent interface - it's
having mutable types. The two can coexist.
I'm afraid I don't know very much about XML Serialization, but I'd be
surprised if there weren't some way of intercepting the deserialization
in the class itself.
--
Jon Skeet - <sk...@pobox.com>
http://www.pobox.com/~skeet Blog: http://www.msmvps.com/jon.skeet
World class .NET training in the UK: http://iterativetraining.co.uk
I'm sure (in fact I know) you can control the xml serialisation at a more
fine grained level but I'm trying not to go down that road at the moment...
Cheers
Ollie
Can I ask what the driver is for fluent in this case? If the problem
is primarily at instantiation, then perhaps consider C# 3 object
initializers? i.e.
Foo foo = new Foo {Width = 100, Length = 20, Name = "Fred", Foo =
"Bar", When = DateTime.Now };
Marc