Serializable in C # object serialization in ——. net

Source: Internet
Author: User
Tags object serialization

Serialization is the process of storing the state of an object instance to a storage medium, in which the public and private fields of the object and the name of the class (including the assembly where the class resides) are converted to a byte stream, and then the byte stream is written to the data stream, and the object is then deserialized, creating exactly the same copy as the original object.

Basic serialization

The simplest way to make a class serializable is to use the Serializable property to tag it, as follows:

[Serializable]    class MyObject {0;  0;  Null;  7}        

Serializable object Serialization in C # ——. net

Related Article

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.