views:

22

answers:

1

My code is like this:

CultureAndRegionInfoBuilder cib = new CultureAndRegionInfoBuilder("eh-sim", CultureAndRegionModifiers.None);
cib.LoadDataFromCultureInfo(new CultureInfo("en-us"));
cib.LoadDataFromRegionInfo(new RegionInfo("US"));
cib.CultureEnglishName = "Versão de teste";
cib.NumberFormat.CurrencyDecimalSeparator = "   ";

cib.Register();
CultureInfo ci = new CultureInfo("eh-sim");
Thread.CurrentThread.CurrentCulture = ci;
Console.WriteLine("EnglishName:. . . . . . . . . . {0}", ci.EnglishName);
Console.WriteLine(123.456.ToString("C"));
Console.ReadKey();

I want to the date format be for example: 10//12//10

+1  A: 

You need to set the cib.GregorianDateTimeFormat to a suitable DateTimeFormatInfo that has the DateSeparator you want (//).

Oded
yes, I did it, thank you.cib.GregorianDateTimeFormat = new DateTimeFormatInfo(){DateSeparator = "//"};
Alan
@Alan, what about accepting this answer if it solved your problem? Click on the symbol left to this answer. Your accept rate 0% does not encourage others to help you...
Martin Vobr