Walter.BOM
Contains Method (GeoExtensionMethods)
Example 
Walter.BOM Assembly > Walter.BOM.Geo Namespace > GeoExtensionMethods Class : Contains Method
The primary country or region to check for association.
The country or region to verify if it has an association with the first parameter.
Determines if a given country or region is associated with another specified country or region.
Syntax
public static bool Contains( 
   GeoLocation region,
   GeoLocation countryOrRegion
)

Parameters

region
The primary country or region to check for association.
countryOrRegion
The country or region to verify if it has an association with the first parameter.

Return Value

True if either is associated with the other as part of the same group; otherwise, false.
Remarks
This method checks for associations such as whether a specific country is part of a broader region. For instance, GeoLocation.Bonaire being associated with GeoLocation.EUROPEAN_UNION as well as GeoLocation.CARIBBEAN. Note that regions are denoted in uppercase, while countries are in PascalCase.
Example
Demonstrate checking if a country is part of a region to apply tax rules:
var country = GeoLocation.Belgium;
             var price = 100;
             var tax = 0.0M;
             if (EUTaxApplicable(country))
             {
                 tax = 14.2M;
             }
            
             var total = (tax * price) + price;
            
             public bool EUTaxApplicable(GeoLocation country)
             {
               var vatApplicable = GeoLocation.EUROPEAN_UNION.Contains(country);
               return vatApplicable;
             }
var country = GeoLocation.CzechRepublic;
var localShipping = GeoLocation.EUROPEAN_UNION.Contains(country) && country.Contains(GeoLocation.CENTRAL_EUROPE);
var euShipping = !localShipping && GeoLocation.EUROPEAN_UNION.Contains(country);
Requirements

Target Platforms: Windows 7, Windows Vista SP1 or later, Windows XP SP3, Windows Server 2008 (Server Core not supported), Windows Server 2008 R2 (Server Core supported with SP1 or later), Windows Server 2003 SP2

See Also

Reference

GeoExtensionMethods Class
GeoExtensionMethods Members