O'Reilly logo

Visual Basic 2010 Unleashed by Alessandro Del Sole

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Serialization in Windows Communication Foundation

There are situations in which serialization is required for persisting state of objects from WCF services. Starting with .NET Framework 3.0, you can serialize objects exposed by WCF services taking advantage of the DataContractSerializer class (which inherits from XmlObjectSerializer). The usage of such a class is not so different from other serialization classes. The only need is that you must mark your serializable classes either with the Serializable or with the DataContract attribute and, in this case, their members with the DataMember attribute. To see how this works in code, create a new WCF service project within Visual Studio 2010 (see Chapter 41, “Creating and Consuming WCF Services ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required