Learn wcf--data contract from scratch

Source: Internet
Author: User
Data Contract Overview
  • By default, WCF uses the serialization engine, called the data Contract serializer, to serialize and deserialize data (and convert it to and from XML).
  • All. Net framework primitive types, such as Integer and string, and some types that are considered primitives, such as datetime and XmlElement, can be serialized and considered to have a default data contract without any other preparation.
  • You must define a data contract for the new complex type that you are creating so that it can be serialized.
  • Under normal circumstances, add DataContractAttribute to this type to complete the task.
  • You can apply this property to classes, structs, and enumerations.
  • The DataMemberAttribute attribute must then be applied to the data

Learn wcf--data contract from scratch

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.