Top "Datacontract" questions

A data contract is a formal agreement between a service and a client that abstractly describes the data to be exchanged.

Namespace for [DataContract]

I can't find the namespace to use for [DataContract] and [DataMember] elements. According to what I've found, it seems that …

c# wcf datacontract
When to use DataContract and DataMember attributes?

I am very confused about the DataContract attribute in WCF. As per my knowledge it is used for serializating user …

wcf datacontractserializer datacontract datamember
DataContract XML serialization and XML attributes

Is it possible to deserialize this XML into an object marked with the DataContract attribute? <root> <distance …

c# xml wcf serialization datacontract
Serialize enum to string

I have an enum: public enum Action { Remove=1, Add=2 } And a class: [DataContract] public class Container { [DataMember] public Action Action {…

c# json datacontract
How to serialize/deserialize a C# WCF DataContract to/from XML

I am developing a WCF service which will be consumed by multiple different client applications. In order to make one …

c# wcf xml-serialization deserialization datacontract
WCF: Exposing readonly DataMember properties without set?

I have a server side class which I make available on the client side through a [DataContract]. This class has …

.net wcf readonly datacontract datamember
Generate DataContract from XSD

I want to be able to generate a DataContract from a XSD file, preferably using the xsd.exe tool. What …

.net wcf xsd datacontract
How can you control .NET DataContract serialization so it uses XML attributes instead of elements?

If I have a class marked as a DataContract and a few properties on it marked with DataMember attributes I …

.net serialization xml-serialization datacontract
How do I add an XML attribute using DataContract

I have a simple class I'm serializing. [DataContract(Name = "Test", Namespace = "")] public class Test { [DataMember(Order = 0, Name = "Text")] public string …

c# .net serialization datacontract
Portable class library: recommended replacement for [Serializable]

I am porting a .NET Framework C# class library to a Portable Class Library. One recurring problem is how to …

c# serialization datacontract serializable portable-class-library