Ejemplo n.º 1
0
        // 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;
				}
			}
Ejemplo n.º 3
0
 // 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;
     }
 }
Ejemplo n.º 4
0
 // Constructor.
 public RegionData(RegionName regionName)
     : base(-1)                  // -1 suppresses the region lookup in the base class.
 {
     this.regionName = regionName;
 }
Ejemplo n.º 5
0
	// Constructor.
	public RegionData(RegionName regionName)
			: base(-1)	// -1 suppresses the region lookup in the base class.
			{
				this.regionName = regionName;
			}