CultureInfo.UseUserOverride 屬性

定義

取得值,指出目前 CultureInfo 是否使用使用者選取的文化特性設定。Gets a value indicating whether the current CultureInfo object uses the user-selected culture settings.

public:
 property bool UseUserOverride { bool get(); };
public bool UseUserOverride { get; }
member this.UseUserOverride : bool
Public ReadOnly Property UseUserOverride As Boolean

屬性值

如果目前 CultureInfo 使用使用者選取的文化特性設定,則為 true;否則為 falsetrue if the current CultureInfo uses the user-selected culture settings; otherwise, false.

備註

使用者可以選擇透過 [控制台] 的 [地區及語言選項] 部分,覆寫與 Windows 目前文化特性相關聯的一些值。The user might choose to override some of the values associated with the current culture of Windows through the regional and language options portion of Control Panel. 例如,使用者可能會選擇以不同的格式來顯示日期,或使用文化特性的預設值以外的貨幣。For example, the user might choose to display the date in a different format or to use a currency other than the default for the culture.

如果 UseUserOverridetrue 而且指定的文化特性與目前的 Windows 文化特性相符,則 CultureInfo 會使用這些覆寫,包括 DateTimeFormat 屬性所傳回之 DateTimeFormatInfo 實例屬性的使用者設定,以及 @no__ 的屬性。NumberFormat 屬性所傳回的 t_5_ 實例。NumberFormatInfoIf UseUserOverride is true and the specified culture matches the current culture of Windows, the CultureInfo uses those overrides, including user settings for the properties of the DateTimeFormatInfo instance returned by the DateTimeFormat property, and the properties of the NumberFormatInfo instance returned by the NumberFormat property. 如果使用者設定與 CultureInfo相關聯的文化特性不相容,例如,如果選取的行事曆不是其中一個 OptionalCalendars,則方法的結果和屬性的值會是未定義的。If the user settings are incompatible with the culture associated with the CultureInfo, for example, if the selected calendar is not one of the OptionalCalendars, the results of the methods and the values of the properties are undefined.

建立 CultureInfo 時,會設定此屬性。This property is set when the CultureInfo is created.

適用於