Serialization in Windows Communication Foundation
In some situations 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 using 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 2015 (refer to Chapter 37, “Creating and Consuming WCF Services,” for a recap) and name ...
Get Visual Basic 2015 Unleashed now with the O’Reilly learning platform.
O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.