I am trying here to parse a number using the Gabon currency formating.
The format uses "." for group separations and no decimals.
Here is an example :
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Globalization;
using System.Threading;
namespace ConsoleApplication4
{
class Program
{
static void Main(string[] args)
{
CultureInfo ci = new CultureInfo("fr-FR");
ci.NumberFormat.CurrencyGroupSeparator = ".";
ci.NumberFormat.CurrencyDecimalDigits = 0;
ci.NumberFormat.CurrencySymbol = "CFA";
Thread.CurrentThread.CurrentCulture = ci;
Thread.CurrentThread.CurrentUICulture = ci;
double.Parse("300.000", ci).ToString("C");
// gives me a FormatException
}
}
}
Is there something I am missing ?