/// <summary> /// Initializes a new instance of the <see cref="Country"/> class. /// </summary> /// <param name="twoLetterIsoCode">The two letter ISO code.</param> protected Country(string twoLetterIsoCode) { Validate.Is.Not.Null(twoLetterIsoCode, "twoLetterIsoCode"); switch (twoLetterIsoCode) { case "US": this.divisions = CountryDivision.GetUnitedStatesDivisions(this); break; case "CA": this.divisions = CountryDivision.GetCanadaDivisions(this); break; default: this.divisions = new ReadOnlyCollection <CountryDivision>(new List <CountryDivision>()); break; } }
/// <summary> /// Returns true if they are equal. /// </summary> /// <param name="other">The other.</param> /// <returns>True if they are equal.</returns> public bool Equals(CountryDivision other) { return(this.TwoLetterCode == other.TwoLetterCode && this.Type == other.Type && this.EnglishName == other.EnglishName && this.NativeName == other.NativeName); }