This documentation is archived and is not being maintained.
Serialization (C++/CLI)
Visual Studio 2013
Serialization (the process of storing the state of an object or member to a permanent medium) of managed classes (including individual fields or properties) is supported by the SerializableAttribute and NonSerializedAttribute classes.
Apply the SerializableAttribute custom attribute to a managed class to serialize the entire class or apply only to specific fields or properties to serialize parts of the managed class. Use the NonSerializedAttribute custom attribute to exempt fields or properties of a managed class from being serialized.
Note that both attributes can be referenced using their "short name" (Serializable and NonSerialized). This is further explained in Applying Attributes.
Show: