.net - Change windows Culture Settings or define new using C# -


can update windows culture settings permanently using c#?

or can define new culture in windows using c#?

if yes, please provide code of c# or vb.net.

i know how change culture settings project.

thanks in advance.

even if want change culture setting, can still run in formatting problems. if user changes settings of culture in windows still not know formatting rules (formatter) can expect. example changing culture before parsing datetime bad practice. if need parse specific formatting, can better make formatter like:

datestring = "sun 15 jun 2008 8:30 -06:00"; format = "ddd dd mmm yyyy h:mm tt zzz"; try {     result = datetime.parseexact(datestring, format, provider);     console.writeline("{0} converts {1}.", datestring, result.tostring()); } catch (formatexception) {     console.writeline("{0} not in correct format.", datestring); } 

good practice assume users computer has right formatting specific user. user can give values in same format other program uses.


Comments

Popular posts from this blog

c++ - Is it possible to compile a VST on linux? -

java - Output of Eclipse is rubbish -

jquery - Confused with JSON data and normal data in Django ajax request -