forked from YaccConstructor/QuickGraph
-
-
Notifications
You must be signed in to change notification settings - Fork 71
.NET Serialization
Alexandre Rabérin edited this page May 12, 2020
·
1 revision
All graph data structure can be serialized using the .NET serialization mechanism. You can also use the SerializeToBinary
extension methods.
var graph = ...; // Some graph
using (var stream = File.Open("graph.bin"))
{
graph.SerializeToBinary(stream);
}
AdjacencyGraph<TVertex,TEdge> graph; // Some graph
using (var stream = File.Open("graph.bin"))
{
graph = stream.DeserializeFromBinary();
}