Skip to content

.NET Serialization

Mark Junker edited this page Jun 7, 2018 · 3 revisions

All graph data structure can be serialized using the .NET serialization mechanism. You can also use the SerializeToBinary extension methods.

Writing

varg= ...;// some graphusing(varstream=File.Open("graph.bin"))g.SerializeToBinary(stream);

Reading

AdjacencyGraph<TVertex,TEdge>g;// some graphusing(varstream=File.Open("graph.bin"))g=stream.DeseralizeFromBinary();

Clone this wiki locally