示例#1
0
        public static TrafficProblem NewRoad(string reasonName)
        {
            TrafficProblem problem = new TrafficProblem(reasonName);

            Problems.Add(problem);
            Save();

            return(problem);
        }
示例#2
0
        // 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);
        }