Click or drag to resize
LocationPostalCode Method
Returns a non-null PostalCodeLocation object with a postal code (or zip code, post code, or postcode) and a two-letter country code representing the country that the postal code belongs to.

Namespace: DegreeDays.Api.Data
Assembly: DegreeDaysApi (in DegreeDaysApi.dll) Version: 1.1.0.0 (1.1.0.0)
Syntax
public static PostalCodeLocation PostalCode(
	string postalCode,
	string twoLetterIsoCountryCodeInUpperCase
)

Parameters

postalCode
Type: SystemString
The non-null, non-empty postal code (or zip code, post code, or postcode) of the location you want data for. Cannot be longer than 16 characters (a length that we believe allows for all current postal codes worldwide), and cannot contain any characters other than [- 0-9a-zA-Z].
twoLetterIsoCountryCodeInUpperCase
Type: SystemString
The ISO 3166-1-alpha-2 country code of the country that postalCode belongs to. It must be a two-character string comprised of only characters A-Z (i.e. upper case only). For example, pass "US" if postalCode is a US zip code, pass "GB" (for "Great Britain") if postalCode is a UK post code, and pass "CA" if postalCode is a Canadian zip code.

Return Value

Type: PostalCodeLocation
The newly-created PostalCodeLocation object.
Exceptions
ExceptionCondition
ArgumentNullExceptionpostalCode or twoLetterIsoCountryCodeInUpperCase is null.
FormatExceptionTests indicate that postalCode or twoLetterIsoCountryCodeInUpperCase fails to match the specifications detailed above.
See Also