public static TrafficProblem NewRoad(string reasonName) { TrafficProblem problem = new TrafficProblem(reasonName); Problems.Add(problem); Save(); return(problem); }
// override object.Equals public override bool Equals(object obj) { if (obj == null || GetType() != obj.GetType()) { return(false); } TrafficProblem other = obj as TrafficProblem; if (other == null) { return(false); } if (!Reason.Equals(other.Reason)) { return(false); } return(true); }