What architecture uses system.runtime.serialization.ISerializable?

I have some classes that implement their serialization / deserialization, but I do all this without implementing system.runtime.serialization.ISerializable. so my question is what exactly is the advantage of using system.runtime.serialization.ISerializable?

In what situation will we need to implement system.runtime.serialization.ISerializable?

+3
source share
2 answers

Serialization does not integrate with standard .net serialization mechanisms. You cannot use it with BinaryFormatter. ISerializableallows you to: a) manage serialization; b) integrate it into the standard binary serialization engine.

It is also very strange that you decide to write your own serialization. It's quite expensive to write efficient serialization of product quality, especially when there are binary and XML serializations ready for use on .net and a couple of cool third-party ones like Protobuf and Thrift.

A great example is really given on the ISerializable page on MSDN.

, , , DateTime . ( , .net 2.0)

+3

ISerializable BinaryFormatter, , , - , - (, - , , / ). " " - (), node, node node .

+2

All Articles