Error: The type arguments for method
GraphMLExtensions.SerializeToGraphML<TVertex, TEdge, TGraph>(TGraph, XmlWriter)
cannot be inferred from the usage.
using System.Xml;
using QuickGraph;
using QuickGraph.Serialization;
var g = new AdjacencyGraph<string, Edge<string>>();
.... add some vertices and edges ....
using (var xwriter = XmlWriter.Create("somefile.xml"))
g.SerializeToGraphML(xwriter);
The code is copied from QuickGraph's documentation. However when I write it explicitly it works:
using (var xwriter = XmlWriter.Create("somefile.xml"))
GraphMLExtensions.SerializeToGraphML<string, Edge<string>, AdjacencyGraph<string, Edge<string>>>(g, xwriter);
Edit: I saw some related questions, but they are too advanced for me. I'm just concerned about using it. Am I doing something wrong or it's the documentation?