System::Globalization::CultureInfo 类
内容
[
隐藏
]CultureInfo class
收集特定于文化的值和算法。仅在非只读对象上启用设置操作。此类的对象应仅使用 System::MakeObject() 函数分配。切勿在栈上或使用 operator new 创建此类型的实例,因为这会导致运行时错误和/或断言故障。始终将此类包装到 System::SmartPtr 指针中,并使用该指针将其作为参数传递给函数。
class CultureInfo : public virtual System::Object,
public System::IFormatProvider,
public System::ICloneable
方法
| 方法 | 描述 |
|---|---|
| ClearCachedData() | 刷新缓存的文化信息。 |
| Clone() override | 克隆文化信息。 |
| static CreateSpecificCulture(const String&) | 按名称创建文化。 |
| explicit CultureInfo(int) | RTTI 信息。 |
| CultureInfo(int, bool) | 构造函数。 |
| explicit CultureInfo(const String&) | 构造函数。 |
| CultureInfo(const String&, bool) | 构造函数。 |
| CultureInfo(std::nullptr_t) | 始终抛出 ArgumentNullException。 |
| Equals(SharedPtr<Object>) override | 比较对象。 |
| virtual get_Calendar() const | 获取该文化使用的日历。 |
| virtual get_CompareInfo() const | 获取遵循文化规则的字符串比较器。 |
| get_CultureTypes() const | 获取描述当前文化的文化类型的按位联合。 |
| static get_CurrentCulture() | 获取为当前线程设置的文化。 |
| static get_CurrentUICulture() | 获取当前线程的 UI 文化。 |
| virtual get_DateTimeFormat() const | 获取日期格式信息。 |
| static get_DefaultThreadCurrentCulture() | 获取当前应用程序域中的默认文化。 |
| static get_DefaultThreadCurrentUICulture() | 获取当前应用程序域中的默认 UI 文化。 |
| virtual get_DisplayName() const | 获取文化的显示名称。 |
| virtual get_EnglishName() const | 获取文化的英文名称。 |
| get_IetfLanguageTag() const | 获取语言的 RFC 4646 名称。 |
| static get_InstalledUICulture() | 获取随操作系统安装的文化。 |
| static get_InvariantCulture() | 获取不变文化。 |
| virtual get_IsNeutralCulture() const | 检查文化是否为中性。 |
| get_IsReadOnly() const | 检查文化对象是否为只读。 |
| virtual get_KeyboardLayoutId() const | 获取活动输入区域标识符。 |
| virtual get_LCID() const | 获取文化标识符。 |
| virtual get_Name() const | 获取文化名称。 |
| virtual get_NativeName() const | 获取区域性本地名称。 |
| virtual get_NumberFormat() const | 获取数字格式信息。 |
| virtual get_OptionalCalendars() const | 可与该区域性一起使用的日历列表。 |
| virtual get_Parent() const | 获取父区域性。 |
| virtual get_TextInfo() const | 获取该区域性使用的文本参数。 |
| virtual get_ThreeLetterISOLanguageName() const | 获取三字母 ISO 639-2 语言代码。 |
| virtual get_ThreeLetterWindowsLanguageName() const | 获取在 Windows API 中定义的语言三字母代码。 |
| virtual get_TwoLetterISOLanguageName() const | 获取与该区域性关联的两字母 ISO 语言名称。 |
| get_UseUserOverride() const | 获取指示 CultureInfo 是否使用用户选择的区域性设置的标志。 |
| GetConsoleFallbackUICulture() const | 获取适用于控制台应用程序的备用区域性。 |
| static GetCultureInfo(const String&) | 通过名称获取区域性。等同于 CreateSpecificCulture。 |
| static GetCultureInfo(const String&, const String&) | 通过名称获取区域性。 |
| static GetCultureInfo(int32_t) | 通过 ID 获取区域性。 |
| static GetCultureInfoByIetfLanguageTag(const String&) | 已弃用。通过指定的 RFC 4646 语言标签获取只读的 CultureInfo 对象。 |
| static GetCultures(CultureTypes) | 获取属于指定类型的区域性。 |
| GetFormat(const TypeInfo&) override | 获取特定类型的格式对象。 |
| GetHashCode() const override | 返回对象哈希码。 |
| IsInherited() const | 获取是否继承的标志。仅供内部使用。 |
| operator=(const CultureInfo&) | |
| operator==(const CultureInfo&) const | 比较区域性参数。 |
| static ReadOnly(const CultureInfoPtr&) | 获取只读的文化版本。 |
| static set_CurrentCulture(const CultureInfoPtr&) | 为当前线程设置区域性。 |
| static set_CurrentUICulture(const CultureInfoPtr&) | 设置当前线程的 UI 区域性。 |
| virtual set_DateTimeFormat(DateTimeFormatInfoPtr) | 设置日期格式信息。 |
| static set_DefaultThreadCurrentCulture(const CultureInfoPtr&) | 在当前应用程序域中设置默认区域性。 |
| static set_DefaultThreadCurrentUICulture(const CultureInfoPtr&) | 在当前应用程序域中设置默认 UI 区域性。 |
| virtual set_NumberFormat(NumberFormatInfoPtr) | 获取数字格式信息。 |
| ToString() const override | 将区域性转换为字符串。 |
另见
- Class Object
- Class IFormatProvider
- Class ICloneable
- Namespace System::Globalization
- Library Aspose.Font for C++