System.Runtime.Serialization.ISerializable

Allows you to provide your own custom binary serialization
When a class needs to control its serialization process it can implement this interace
The order in which objects are deserialized cannot be guaranteed


[Serializable] 
public class MyClass : ISerializable
{
}

Serialization is the process of converting complex objects into a stream of bytes for storage


GetObjectData Method

This method is called to serialise the object.
Populates a SerializationInfo with the data needed to serialize the target object



Constructor Method

A special constructor method is called to deserialize the object.





© 2024 Better Solutions Limited. All Rights Reserved. © 2024 Better Solutions Limited TopPrevNext