GetPostcodeRegex() public static method

GetPostcodeRegex gets the postal code regular expression for the region
public static GetPostcodeRegex ( string regionId ) : string
regionId string The Id of the region to get the postal code regular expression for
return string
Exemplo n.º 1
0
        /// <summary>
        /// GetPostcodeRegex gets the postal code regular expression for the CultureInfo
        /// </summary>
        /// <param name="cultureInfo">The CultureInfo to get the postal code regular expression for</param>
        /// <returns>The postal code regular expression for the CultureInfo</returns>
        public static string GetPostcodeRegex(this CultureInfo cultureInfo)
        {
            AssertHasRegionInfo(cultureInfo);
            RegionInfo regionInfo = new RegionInfo(cultureInfo.Name);

            return(RegionExtensions.GetPostcodeRegex(regionInfo.TwoLetterISORegionName));
        }
Exemplo n.º 2
0
 /// <summary>
 /// GetPostcodeRegex gets the postal code regular expression for the RegionInfo
 /// </summary>
 /// <param name="regionInfo">The RegionInfo to get the postal code regular expression for</param>
 /// <returns>The postal code regular expression for the RegionInfo</returns>
 public static string GetPostcodeRegex(this RegionInfo regionInfo)
 {
     return(RegionExtensions.GetPostcodeRegex(regionInfo.TwoLetterISORegionName));
 }