varmyNode=newDotNode("MyNode") {
// Set all available propertiesShape=DotNodeShape.Ellipse,
Label="My node !",
FillColor=DotColor.Lightgrey,
FontColor=DotColor.Black,
Style=DotNodeStyle.Default,
Height=0.5f
};
// Add the node to the graphgraph.Add(myNode);
Create and add an arrow (DotArrow)
// Create an arrow with node namesvarmyArrow=newDotArrow("myNode1", "myNode2");
// Create an arrow with node objectsvarmyArrow=newDotArrow(myNode1, myNode2) {
// Set all available propertiesArrowHeadShape=DotArrowShape.Normal;
};
// Add the arrow to the graphgraph.Add(myArrow);
Compile to DOT format
// Indented versionvardot=graph.Compile();
// Minified versionvardot=graph.Compile(true);
// Save it to a fileFile.WriteAllText("myFile.dot", dot);