What
is the preferred way for serializing complex types in WCF?
The preferred way for serializing complex types in WCF is to use data contracts.
Using Data Contracts, it provides with the
following advantages.
1. Using DataMember attribute, you can control which members of the class to serialize.
2. You can also control the order in which members are serialized using Order parameter of the DataMember attribute..
3. You can also provide explicit Name to
the serialized members using Name parameter of the DataMember attribute.
4. You can also specify if a member is
required or optional using IsRequired parameter of the DataMember attribute
No comments :
Post a Comment