示例#1
0
 public override bool Equals(System.Object otherCity)
 {
     if (!(otherCity is City))
     {
         return(false);
     }
     else
     {
         City newCity      = (City)otherCity;
         bool nameEquality = (this.GetCityName() == newCity.GetCityName());
         return(nameEquality);
     }
 }