CultureInfo.ClearCachedData 方法


重新整理已快取的文化特性相關資訊。Refreshes cached culture-related information.

 void ClearCachedData();
public void ClearCachedData ();
member this.ClearCachedData : unit -> unit
Public Sub ClearCachedData ()


系統會在第一次要求時快取資訊,例如預設的文化特性和格式模式。Information, such as the default culture and format patterns, is cached the first time it is requested. 這項資訊可能會在的生命週期中變更 AppDomain ,例如,當使用者修改 [控制台] 的 [地區及語言選項] 部分時。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. 不過, CultureInfo 類別不會自動偵測系統設定中的變更。However, the CultureInfo class does not automatically detect changes in the system settings.

ClearCachedData方法會清除所建立之物件的快取, CultureInfo GetCultureInfoCurrentCulture CurrentUICulture CurrentRegion 根據目前的系統設定,重新整理、和屬性中的資訊。The ClearCachedData method clears the cache of CultureInfo objects created by GetCultureInfo and refreshes the information in the CurrentCulture, CurrentUICulture, and CurrentRegion properties, based on the current system settings.

方法不會重新整理 ClearCachedData 現有線程之屬性中的資訊 Thread.CurrentCultureThe ClearCachedData method does not refresh the information in the Thread.CurrentCulture property for existing threads. 不過,未來的執行緒會有任何新的 CultureInfo 屬性值。However, future threads will have any new CultureInfo property values.