Author: cklein | Posted on: 6/9/2008 11:04:01 PM | Views : 1214

I have to say, I hated WCF very much when I saw it the first time, especially the DataContract/DataMemeber attribute.
I mean, I have been using [Serializable] Attribute for a long time, and I feel very comfortable to use all the XML attributes to annotate my objects, when WCF comes along,  suddenly, I need to redecorate all my classes with this new [DataContract], [DataMember[ attribute, to achieve pretty much the same thing! I know why they decided this way, but without the support of POCO (plain old C# object) serialization is just too stupid a design, in my opinion.
Then this .Net SP1 came along, promise that it will serialize POCO. Then I found out it actually serialized my private fields, instead of public properties!
It was saying it's because the [Serializable] attribute. If there's no Serializable attribute, everything should be fine.
Come on, I mean. what you are telling me is: If your object can be serialized by WCF, then it should NOT ...

Go to the complete details ...