System.Globalization.CultureInfo.ClearCachedData Method

Refreshes cached culture-related information.

Syntax

public void ClearCachedData ()

Remarks

Information, such as the default culture and format patterns, is cached the first time it is requested. That information can change during the life of the AppDomain, for example, when the user modifies the regional and language options portion of Control Panel. However, the System.Globalization.CultureInfo class does not automatically detect changes in the system settings.

The CultureInfo.ClearCachedData method clears the cache of System.Globalization.CultureInfo objects created by erload:System.Globalization.CultureInfo.GetCultureInfo and refreshes the information in the CultureInfo.CurrentCulture, CultureInfo.CurrentUICulture, and RegionInfo.CurrentRegion properties, based on the current system settings.

The CultureInfo.ClearCachedData method does not refresh the information in the System.Threading.Thread.CurrentCulture property for existing threads. However, future threads will have any new System.Globalization.CultureInfo property values.

Requirements

Namespace: System.Globalization
Assembly: mscorlib (in mscorlib.dll)
Assembly Versions: 1.0.5000.0, 2.0.0.0, 4.0.0.0