예제 #1
0
 public int CompareTo(Station other) //sort stations in list
 {
     if (other == null)
     {
         return(1);   // All instances are greater than null
     }
     return(StationName.CompareTo(other.StationName));
 }
예제 #2
0
        public int CompareTo(Station other)
        {
            if (Equals(other))
            {
                return(0);
            }

            return(StationName.CompareTo(other.StationName));
        }