public Country GetCountryRefInsideList(Country toFind, ObservableCollection <Country> countries) { foreach (Country country in countries) { if (toFind.Equals(country)) { return(country); } } return(null); }
public bool Equals(Address other) { if (!Country.Equals(other.Country)) { return(false); } if (!Town.Equals(other.Town)) { return(false); } if (!Street.Equals(other.Street)) { return(false); } if (!Building.Equals(other.Building)) { return(false); } return(true); }