Click here to Skip to main content
15,890,282 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
Currently i can fetch ShortDatePattern form this culture info

CultureInfo cultureInfo = CultureInfo.CurrentCulture;
string datePattern = cultureInfo.DateTimeFormat.ShortDatePatter

But if i change short date format from PC this pattern will not change untill apllication is invoked again because of CultureInfo-This will remain in application once it is started .Is there another way to fetch ShortDatePattern from system without using CultureInfo
Posted

1 solution

Call CultureInfo.ClearCachedData[^]. Hope is helps :-)

And perhaps use UserPreferenceChangedEventHandler[^] and check UserPreferenceChangedEventArgs.Category Property[^] to check for Locale - Indicates changes in user preferences for regional settings, such as the character encoding and culture strings.
 
Share this answer
 
v2
Comments
Sergey Alexandrovich Kryukov 16-Jun-11 14:59pm    
Good points, my 5.
--SA

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900