private void AddArc(string start, string end, decimal weight) { ArcList.ForEach(arc => { if (arc.Start.Equals(start) && arc.End.Equals(end)) { throw new ArgumentException("添加了重复的边!"); } }); ArcList.Add(new Arc(start, end, weight)); }