// Add currency information to a NumberFormatInfo object. public static void AddCurrencyInfo (NumberFormatInfo nfi, RootCulture culture) { String country = culture.Country; if (country != null) { RegionName region = GetNameInfoByName(country); if (region != null) { nfi.CurrencySymbol = region.currencySymbol; nfi.CurrencyDecimalDigits = region.currencyDigits; } } }
// Add an item to the region name table. public static void Add(RegionName name) { if(numRegions < regions.Length) { regions[numRegions++] = name; } else { RegionName[] newRegions; newRegions = new RegionName [numRegions + TableExtendSize]; Array.Copy(regions, newRegions, regions.Length); regions = newRegions; regions[numRegions++] = name; } }
// Add an item to the region name table. public static void Add(RegionName name) { if (numRegions < regions.Length) { regions[numRegions++] = name; } else { RegionName[] newRegions; newRegions = new RegionName [numRegions + TableExtendSize]; Array.Copy(regions, newRegions, regions.Length); regions = newRegions; regions[numRegions++] = name; } }
// Constructor. public RegionData(RegionName regionName) : base(-1) // -1 suppresses the region lookup in the base class. { this.regionName = regionName; }