public MyEdge(int from, int to, MyGraph g) { From = from; To = to; this.from = g.GetNode(from); this.to = g.GetNode(to); }