public string CreateGraph() { string data = "digraph {" + Environment.NewLine + "rankdir = LR;" + Environment.NewLine + "\"\" [shape = none]"; foreach (State state in ListStates) { data += Environment.NewLine + state.CreateGraph(); } data += Environment.NewLine; data += Environment.NewLine + $"\"\" -> \"" + ListStates.Find(x => x.IsInitial).State_Name + "\""; foreach (Transition transition in ListTransitions) { data += Environment.NewLine + transition.CreateGraph(); } data += Environment.NewLine + "}"; return(data); }