Was this page helpful?
Your feedback about this content is important. Let us know what you think.
Additional feedback?
1500 characters remaining
Export (0) Print
Expand All

CountryOrRegion Property (Hybrid)

Updated: August 2, 2013

Published: June 4, 2013

Gets or sets the two-character country or region code to use for targeting advertisements.

Namespace: Microsoft.Advertising.Mobile.Xna

Assembly: Microsoft.Advertising.Mobile.Xna (in Microsoft.Advertising.Mobile.Xna.dll)

public string CountryOrRegion { get; set; }

Return Value


The CountryOrRegion property is global and applies to every DrawableAd in a game. When set multiple times, even on different DrawableAd objects, the last value that was set is used for all DrawableAd objects.

The AdComponent.CountryOrRegion value is null by default. Use the RegionInfo class to obtain the current country or region. The following is an example of how to set the property.

adComponent.CountryOrRegion = RegionInfo.CurrentRegion.TwoLetterISORegionName;





Invalid country or region code.

Country/Region Code Values

The country or region code is a two-letter code defined in ISO 3166. For the current list of values for country or region codes, see English country names and code elements on the ISO Web site.


Windows Phone 7.x only

Support and Feedback

Get product support or report a bug in the product by visiting the Windows Phone Dev Center support page (scroll down to the section "Microsoft Advertising support").

Send feedback about this documentation to adsfdbk@microsoft.com. There is no product support through this alias. Documentation feedback only.

Community Additions

© 2015 Microsoft