15 [__DynamicallyInvokable]
18 internal bool m_isReadOnly;
33 [OptionalField(VersionAdded = 1)]
34 internal int m_dataItem;
36 [OptionalField(VersionAdded = 1)]
37 internal int cultureID = 127;
40 internal CultureData m_cultureData;
43 internal bool m_isInherited;
46 private bool m_isSafeCrossDomain;
49 private int m_createdDomainID;
54 internal string m_name;
57 private string m_nonSortName;
60 private string m_sortName;
62 private static volatile CultureInfo s_userDefaultCulture;
64 private static volatile CultureInfo s_InvariantCultureInfo;
66 private static volatile CultureInfo s_userDefaultUICulture;
68 private static volatile CultureInfo s_InstalledUICultureInfo;
70 private static volatile CultureInfo s_DefaultThreadCurrentUICulture;
72 private static volatile CultureInfo s_DefaultThreadCurrentCulture;
74 private static volatile Hashtable s_LcidCachedCultures;
76 private static volatile Hashtable s_NameCachedCultures;
79 private static volatile WindowsRuntimeResourceManagerBase s_WindowsRuntimeResourceManager;
82 private static bool ts_IsDoingAppXCultureInfoLookup;
87 internal const int LOCALE_NEUTRAL = 0;
89 private const int LOCALE_USER_DEFAULT = 1024;
91 private const int LOCALE_SYSTEM_DEFAULT = 2048;
93 internal const int LOCALE_CUSTOM_DEFAULT = 3072;
95 internal const int LOCALE_CUSTOM_UNSPECIFIED = 4096;
97 internal const int LOCALE_INVARIANT = 127;
99 private const int LOCALE_TRADITIONAL_SPANISH = 1034;
101 private static readonly
bool init = Init();
103 private bool m_useUserOverride;
105 private const int LOCALE_SORTID_MASK = 983040;
107 private static volatile bool s_isTaiwanSku;
109 private static volatile bool s_haveIsTaiwanSku;
111 internal bool IsSafeCrossDomain => m_isSafeCrossDomain;
113 internal int CreatedDomainID => m_createdDomainID;
118 [__DynamicallyInvokable]
121 [__DynamicallyInvokable]
126 [__DynamicallyInvokable]
133 if (!
AppDomain.IsAppXModel() || !SetCultureInfoForUserPreferredLanguageInAppX(value))
145 if (cultureInfo ==
null)
148 cultureInfo = (s_userDefaultCulture = InitUserDefaultCulture());
159 if (cultureInfo ==
null)
162 cultureInfo = (s_userDefaultUICulture = InitUserDefaultUICulture());
172 [__DynamicallyInvokable]
175 [__DynamicallyInvokable]
180 [__DynamicallyInvokable]
187 if (!
AppDomain.IsAppXModel() || !SetCultureInfoForUserPreferredLanguageInAppX(value))
200 CultureInfo cultureInfo = s_InstalledUICultureInfo;
201 if (cultureInfo ==
null)
203 string systemDefaultUILanguage = GetSystemDefaultUILanguage();
204 cultureInfo = GetCultureByName(systemDefaultUILanguage, userOverride:
true);
205 if (cultureInfo ==
null)
209 cultureInfo.m_isReadOnly =
true;
210 s_InstalledUICultureInfo = cultureInfo;
218 [__DynamicallyInvokable]
221 [__DynamicallyInvokable]
224 return s_DefaultThreadCurrentCulture;
226 [SecuritySafeCritical]
227 [__DynamicallyInvokable]
231 s_DefaultThreadCurrentCulture = value;
238 [__DynamicallyInvokable]
241 [__DynamicallyInvokable]
244 return s_DefaultThreadCurrentUICulture;
246 [SecuritySafeCritical]
247 [__DynamicallyInvokable]
253 VerifyCultureName(value, throwException:
true);
255 s_DefaultThreadCurrentUICulture = value;
261 [__DynamicallyInvokable]
264 [__DynamicallyInvokable]
267 return s_InvariantCultureInfo;
273 [__DynamicallyInvokable]
276 [SecuritySafeCritical]
277 [__DynamicallyInvokable]
281 if (m_parent ==
null)
283 string sPARENT = m_cultureData.SPARENT;
284 if (
string.IsNullOrEmpty(sPARENT))
290 cultureInfo = CreateCultureInfoNoThrow(sPARENT, m_cultureData.UseUserOverride);
291 if (cultureInfo ==
null)
304 public virtual int LCID => m_cultureData.ILANGUAGE;
313 return m_cultureData.IINPUTLANGUAGEHANDLE;
319 [__DynamicallyInvokable]
320 public virtual string Name 322 [__DynamicallyInvokable]
325 if (m_nonSortName ==
null)
327 m_nonSortName = m_cultureData.SNAME;
328 if (m_nonSortName ==
null)
330 m_nonSortName =
string.Empty;
333 return m_nonSortName;
337 internal string SortName
341 if (m_sortName ==
null)
343 m_sortName = m_cultureData.SCOMPAREINFO;
357 if (!(name ==
"zh-CHT"))
359 if (name ==
"zh-CHS")
371 [__DynamicallyInvokable]
374 [SecuritySafeCritical]
375 [__DynamicallyInvokable]
378 return m_cultureData.SLOCALIZEDDISPLAYNAME;
384 [__DynamicallyInvokable]
387 [SecuritySafeCritical]
388 [__DynamicallyInvokable]
391 return m_cultureData.SNATIVEDISPLAYNAME;
397 [__DynamicallyInvokable]
400 [SecuritySafeCritical]
401 [__DynamicallyInvokable]
404 return m_cultureData.SENGDISPLAYNAME;
410 [__DynamicallyInvokable]
413 [SecuritySafeCritical]
414 [__DynamicallyInvokable]
417 return m_cultureData.SISO639LANGNAME;
425 [SecuritySafeCritical]
428 return m_cultureData.SISO639LANGNAME2;
436 [SecuritySafeCritical]
439 return m_cultureData.SABBREVLANGNAME;
445 [__DynamicallyInvokable]
448 [__DynamicallyInvokable]
451 if (compareInfo ==
null)
454 if (!CompatibilitySwitches.IsCompatibilityBehaviorDefined)
458 compareInfo = result;
468 if (this.regionInfo ==
null)
472 return this.regionInfo;
478 [__DynamicallyInvokable]
481 [__DynamicallyInvokable]
484 if (this.textInfo ==
null)
487 textInfo.SetReadOnlyState(m_isReadOnly);
488 if (!CompatibilitySwitches.IsCompatibilityBehaviorDefined)
492 this.textInfo = textInfo;
494 return this.textInfo;
501 [__DynamicallyInvokable]
504 [__DynamicallyInvokable]
507 return m_cultureData.IsNeutralCulture;
519 cultureTypes = ((!m_cultureData.IsNeutralCulture) ? (cultureTypes |
CultureTypes.SpecificCultures) : (cultureTypes |
CultureTypes.NeutralCultures));
520 cultureTypes = (
CultureTypes)((
int)cultureTypes | (m_cultureData.IsWin32Installed ? 4 : 0));
521 cultureTypes = (
CultureTypes)((
int)cultureTypes | (m_cultureData.IsFramework ? 64 : 0));
522 cultureTypes = (
CultureTypes)((
int)cultureTypes | (m_cultureData.IsSupplementalCustomCulture ? 8 : 0));
523 return (
CultureTypes)((int)cultureTypes | (m_cultureData.IsReplacementCulture ? 24 : 0));
531 [__DynamicallyInvokable]
534 [__DynamicallyInvokable]
540 numberFormatInfo.isReadOnly = m_isReadOnly;
541 numInfo = numberFormatInfo;
545 [__DynamicallyInvokable]
561 [__DynamicallyInvokable]
564 [__DynamicallyInvokable]
567 if (dateTimeInfo ==
null)
570 dateTimeFormatInfo.m_isReadOnly = m_isReadOnly;
572 dateTimeInfo = dateTimeFormatInfo;
576 [__DynamicallyInvokable]
584 dateTimeInfo = value;
590 [__DynamicallyInvokable]
593 [__DynamicallyInvokable]
596 if (calendar ==
null)
598 Calendar defaultCalendar = m_cultureData.DefaultCalendar;
600 defaultCalendar.SetReadOnlyState(m_isReadOnly);
601 calendar = defaultCalendar;
609 [__DynamicallyInvokable]
612 [__DynamicallyInvokable]
615 int[] calendarIds = m_cultureData.CalendarIds;
617 for (
int i = 0; i < array.Length; i++)
619 array[i] = GetCalendarInstance(calendarIds[i]);
633 [__DynamicallyInvokable]
636 [__DynamicallyInvokable]
645 internal static bool IsTaiwanSku
649 if (!s_haveIsTaiwanSku)
651 s_isTaiwanSku = (GetSystemDefaultUILanguage() ==
"zh-TW");
652 s_haveIsTaiwanSku =
true;
654 return s_isTaiwanSku;
658 private static bool Init()
660 if (s_InvariantCultureInfo ==
null)
663 cultureInfo.m_isReadOnly =
true;
664 s_InvariantCultureInfo = cultureInfo;
666 s_userDefaultCulture = (s_userDefaultUICulture = s_InvariantCultureInfo);
667 s_userDefaultCulture = InitUserDefaultCulture();
668 s_userDefaultUICulture = InitUserDefaultUICulture();
672 [SecuritySafeCritical]
673 private static CultureInfo InitUserDefaultCulture()
675 string defaultLocaleName = GetDefaultLocaleName(1024);
676 if (defaultLocaleName ==
null)
678 defaultLocaleName = GetDefaultLocaleName(2048);
679 if (defaultLocaleName ==
null)
684 CultureInfo cultureByName = GetCultureByName(defaultLocaleName, userOverride:
true);
685 cultureByName.m_isReadOnly =
true;
686 return cultureByName;
689 private static CultureInfo InitUserDefaultUICulture()
691 string userDefaultUILanguage = GetUserDefaultUILanguage();
692 if (userDefaultUILanguage == UserDefaultCulture.
Name)
694 return UserDefaultCulture;
696 CultureInfo cultureByName = GetCultureByName(userDefaultUILanguage, userOverride:
true);
697 if (cultureByName ==
null)
701 cultureByName.m_isReadOnly =
true;
702 return cultureByName;
705 [SecuritySafeCritical]
706 internal static CultureInfo GetCultureInfoForUserPreferredLanguageInAppX()
708 if (ts_IsDoingAppXCultureInfoLookup)
719 ts_IsDoingAppXCultureInfoLookup =
true;
720 if (s_WindowsRuntimeResourceManager ==
null)
722 s_WindowsRuntimeResourceManager =
ResourceManager.GetWinRTResourceManager();
724 return s_WindowsRuntimeResourceManager.GlobalResourceContextBestFitCultureInfo;
728 ts_IsDoingAppXCultureInfoLookup =
false;
732 [SecuritySafeCritical]
733 internal static bool SetCultureInfoForUserPreferredLanguageInAppX(
CultureInfo ci)
739 if (s_WindowsRuntimeResourceManager ==
null)
741 s_WindowsRuntimeResourceManager =
ResourceManager.GetWinRTResourceManager();
743 return s_WindowsRuntimeResourceManager.SetGlobalResourceContextDefaultCulture(ci);
752 [__DynamicallyInvokable]
754 : this(name, useUserOverride: true)
771 m_cultureData = CultureData.GetCultureData(name, useUserOverride);
772 if (m_cultureData ==
null)
776 m_name = m_cultureData.CultureName;
777 m_isInherited = (GetType() != typeof(
CultureInfo));
782 m_cultureData = cultureData;
783 m_name = cultureData.CultureName;
784 m_isInherited =
false;
787 private static CultureInfo CreateCultureInfoNoThrow(
string name,
bool useUserOverride)
789 CultureData cultureData = CultureData.GetCultureData(name, useUserOverride);
790 if (cultureData ==
null)
804 : this(culture, useUserOverride: true)
821 InitializeFromCultureId(culture, useUserOverride);
824 private void InitializeFromCultureId(
int culture,
bool useUserOverride)
835 m_cultureData = CultureData.GetCultureData(culture, useUserOverride);
836 m_isInherited = (GetType() != typeof(
CultureInfo));
837 m_name = m_cultureData.CultureName;
840 internal static void CheckDomainSafetyObject(
object obj,
object container)
842 if (obj.GetType().Assembly != typeof(
CultureInfo).Assembly)
844 throw new InvalidOperationException(
string.
Format(
CurrentCulture, Environment.GetResourceString(
"InvalidOperation_SubclassedObject"), obj.GetType(), container.GetType()));
851 if (m_name ==
null || IsAlternateSortLcid(cultureID))
853 InitializeFromCultureId(cultureID, m_useUserOverride);
857 m_cultureData = CultureData.GetCultureData(m_name, m_useUserOverride);
858 if (m_cultureData ==
null)
860 throw new CultureNotFoundException(
"m_name", m_name, Environment.GetResourceString(
"Argument_CultureNotSupported"));
863 m_isInherited = (GetType() != typeof(
CultureInfo));
864 if (GetType().Assembly == typeof(
CultureInfo).Assembly)
866 if (textInfo !=
null)
868 CheckDomainSafetyObject(textInfo,
this);
870 if (compareInfo !=
null)
872 CheckDomainSafetyObject(compareInfo,
this);
877 private static bool IsAlternateSortLcid(
int lcid)
883 return (lcid & 0xF0000) != 0;
889 m_name = m_cultureData.CultureName;
890 m_useUserOverride = m_cultureData.UseUserOverride;
891 cultureID = m_cultureData.ILANGUAGE;
894 internal void StartCrossDomainTracking()
896 if (m_createdDomainID == 0)
898 if (CanSendCrossDomain())
900 m_isSafeCrossDomain =
true;
907 internal bool CanSendCrossDomain()
917 internal CultureInfo(
string cultureName,
string textAndCompareCultureName)
919 if (cultureName ==
null)
921 throw new ArgumentNullException(
"cultureName", Environment.GetResourceString(
"ArgumentNull_String"));
923 m_cultureData = CultureData.GetCultureData(cultureName, useUserOverride:
false);
924 if (m_cultureData ==
null)
926 throw new CultureNotFoundException(
"cultureName", cultureName, Environment.GetResourceString(
"Argument_CultureNotSupported"));
928 m_name = m_cultureData.CultureName;
930 compareInfo = cultureInfo.CompareInfo;
931 textInfo = cultureInfo.TextInfo;
934 private static CultureInfo GetCultureByName(
string name,
bool userOverride)
940 catch (ArgumentException)
963 for (
int i = 0; i < name.Length; i++)
969 cultureInfo =
new CultureInfo(name.Substring(0, i));
978 if (cultureInfo ==
null)
987 return new CultureInfo(cultureInfo.m_cultureData.SSPECIFICCULTURE);
990 internal static bool VerifyCultureName(
string cultureName,
bool throwException)
992 foreach (
char c
in cultureName)
994 if (!
char.IsLetterOrDigit(c) && c !=
'-' && c !=
'_')
1006 internal static bool VerifyCultureName(
CultureInfo culture,
bool throwException)
1008 if (!culture.m_isInherited)
1012 return VerifyCultureName(culture.Name, throwException);
1033 [__DynamicallyInvokable]
1041 if (cultureInfo !=
null)
1054 [__DynamicallyInvokable]
1062 [__DynamicallyInvokable]
1071 [__DynamicallyInvokable]
1088 s_userDefaultUICulture =
null;
1089 s_userDefaultCulture =
null;
1093 s_LcidCachedCultures =
null;
1094 s_NameCachedCultures =
null;
1095 CultureData.ClearCachedData();
1098 internal static Calendar GetCalendarInstance(
int calType)
1104 return GetCalendarInstanceRare(calType);
1107 internal static Calendar GetCalendarInstanceRare(
int calType)
1118 return new TaiwanCalendar();
1120 return new JapaneseCalendar();
1122 return new KoreanCalendar();
1124 return new ThaiBuddhistCalendar();
1126 return new HijriCalendar();
1128 return new HebrewCalendar();
1130 return new UmAlQuraCalendar();
1132 return new PersianCalendar();
1134 return new ChineseLunisolarCalendar();
1136 return new JapaneseLunisolarCalendar();
1138 return new KoreanLunisolarCalendar();
1140 return new TaiwanLunisolarCalendar();
1142 return new GregorianCalendar();
1148 [SecuritySafeCritical]
1152 CultureInfo cultureInfo = m_consoleFallbackCulture;
1153 if (cultureInfo ==
null)
1156 cultureInfo.m_isReadOnly =
true;
1157 m_consoleFallbackCulture = cultureInfo;
1164 [__DynamicallyInvokable]
1168 cultureInfo.m_isReadOnly =
false;
1171 if (dateTimeInfo !=
null)
1175 if (numInfo !=
null)
1185 if (textInfo !=
null)
1189 if (calendar !=
null)
1201 [__DynamicallyInvokable]
1215 if (!ci.m_isInherited)
1217 if (ci.dateTimeInfo !=
null)
1221 if (ci.numInfo !=
null)
1232 if (ci.textInfo !=
null)
1236 if (ci.calendar !=
null)
1240 cultureInfo.m_isReadOnly =
true;
1244 private void VerifyWritable()
1252 internal static CultureInfo GetCultureInfoHelper(
int lcid,
string name,
string altName)
1254 Hashtable hashtable = s_NameCachedCultures;
1257 name = CultureData.AnsiToLower(name);
1259 if (altName !=
null)
1261 altName = CultureData.AnsiToLower(altName);
1264 if (hashtable ==
null)
1273 cultureInfo = (
CultureInfo)hashtable[name +
"�" + altName];
1274 if (cultureInfo !=
null)
1281 if (cultureInfo !=
null)
1288 Hashtable hashtable2 = s_LcidCachedCultures;
1289 if (hashtable2 ==
null)
1296 if (cultureInfo !=
null)
1309 cultureInfo =
new CultureInfo(name, useUserOverride:
false);
1312 cultureInfo =
new CultureInfo(lcid, useUserOverride:
false);
1316 catch (ArgumentException)
1320 cultureInfo.m_isReadOnly =
true;
1323 hashtable[name +
"�" + altName] = cultureInfo;
1324 cultureInfo.TextInfo.SetReadOnlyState(readOnly:
true);
1328 string text = CultureData.AnsiToLower(cultureInfo.m_name);
1329 hashtable[text] = cultureInfo;
1330 if ((cultureInfo.LCID != 4 || !(text ==
"zh-hans")) && (cultureInfo.LCID != 31748 || !(text ==
"zh-hant")))
1332 hashtable2[cultureInfo.LCID] = cultureInfo;
1337 s_LcidCachedCultures = hashtable2;
1339 s_NameCachedCultures = hashtable;
1356 CultureInfo cultureInfoHelper = GetCultureInfoHelper(culture,
null,
null);
1357 if (cultureInfoHelper ==
null)
1361 return cultureInfoHelper;
1377 CultureInfo cultureInfoHelper = GetCultureInfoHelper(0, name,
null);
1378 if (cultureInfoHelper ==
null)
1382 return cultureInfoHelper;
1399 if (altName ==
null)
1403 CultureInfo cultureInfoHelper = GetCultureInfoHelper(-1, name, altName);
1404 if (cultureInfoHelper ==
null)
1408 return cultureInfoHelper;
1420 if (name ==
"zh-CHT" || name ==
"zh-CHS")
1425 if (cultureInfo.
LCID > 65535 || cultureInfo.
LCID == 1034)
1434 internal static extern string nativeGetLocaleInfoEx(
string localeName, uint field);
1437 [SecuritySafeCritical]
1438 internal static extern int nativeGetLocaleInfoExInt(
string localeName, uint field);
1442 internal static extern bool nativeSetThreadLocale(
string localeName);
1445 private static string GetDefaultLocaleName(
int localeType)
1448 if (InternalGetDefaultLocaleName(localeType, JitHelpers.GetStringHandleOnStack(ref s)))
1452 return string.Empty;
1457 [SuppressUnmanagedCodeSecurity]
1459 private static extern bool InternalGetDefaultLocaleName(
int localetype, StringHandleOnStack localeString);
1461 [SecuritySafeCritical]
1462 private static string GetUserDefaultUILanguage()
1465 if (InternalGetUserDefaultUILanguage(JitHelpers.GetStringHandleOnStack(ref s)))
1469 return string.Empty;
1474 [SuppressUnmanagedCodeSecurity]
1476 private static extern bool InternalGetUserDefaultUILanguage(StringHandleOnStack userDefaultUiLanguage);
1478 [SecuritySafeCritical]
1479 private static string GetSystemDefaultUILanguage()
1482 if (InternalGetSystemDefaultUILanguage(JitHelpers.GetStringHandleOnStack(ref s)))
1486 return string.Empty;
1492 [SuppressUnmanagedCodeSecurity]
1494 private static extern bool InternalGetSystemDefaultUILanguage(StringHandleOnStack systemDefaultUiLanguage);
static CultureInfo GetCultureInfoByIetfLanguageTag(string name)
Deprecated. Retrieves a read-only T:System.Globalization.CultureInfo object having linguistic charact...
static Thread CurrentThread
Gets the currently running thread.
virtual object Clone()
Creates a copy of the current T:System.Globalization.CultureInfo.
virtual CultureInfo Parent
Gets the T:System.Globalization.CultureInfo that represents the parent culture of the current T:Syste...
Represents any time zone in the world.
static CultureInfo InvariantCulture
Gets the T:System.Globalization.CultureInfo object that is culture-independent (invariant).
object Clone()
Creates a new object that is a copy of the current instance.
static CultureInfo DefaultThreadCurrentUICulture
Gets or sets the default UI culture for threads in the current application domain.
The exception that is thrown when a null reference (Nothing in Visual Basic) is passed to a method th...
virtual object GetFormat(Type formatType)
Gets an object that defines how to format the specified type.
Describes a set of security permissions applied to code. This class cannot be inherited.
Represents time in divisions, such as weeks, months, and years.
virtual string NativeName
Gets the culture name, consisting of the language, the country/region, and the optional script,...
bool IsReadOnly
Gets a value indicating whether the current T:System.Globalization.CultureInfo is read-only.
static CultureInfo InstalledUICulture
Gets the T:System.Globalization.CultureInfo that represents the culture installed with the operating ...
Ability to use certain advanced operations on threads.
CultureTypes
Defines the types of culture lists that can be retrieved using the M:System.Globalization....
static void MemoryBarrier()
Synchronizes memory access as follows: The processor executing the current thread cannot reorder inst...
virtual CompareInfo? CompareInfo
Gets the T:System.Globalization.CompareInfo that defines how to compare strings for the culture.
CultureInfo(string name, bool useUserOverride)
Initializes a new instance of the T:System.Globalization.CultureInfo class based on the culture speci...
Represents the Gregorian calendar.
override bool Equals(object value)
Determines whether the specified object is equal to the current T:System.Globalization....
The exception that is thrown when the value of an argument is outside the allowable range of values a...
CultureInfo(int culture, bool useUserOverride)
Initializes a new instance of the T:System.Globalization.CultureInfo class based on the culture speci...
virtual string TwoLetterISOLanguageName
Gets the ISO 639-1 two-letter code for the language of the current T:System.Globalization....
virtual string Name
Gets the culture name in the format languagecode2-country/regioncode2.
override int GetHashCode()
Serves as a hash function for the current T:System.Globalization.CompareInfo for hashing algorithms a...
GregorianCalendarTypes
Defines the different language versions of the Gregorian calendar.
CultureInfo(string name)
Initializes a new instance of the T:System.Globalization.CultureInfo class based on the culture speci...
virtual string ThreeLetterISOLanguageName
Gets the ISO 639-2 three-letter code for the language of the current T:System.Globalization....
static CultureInfo ReadOnly(CultureInfo ci)
Returns a read-only wrapper around the specified T:System.Globalization.CultureInfo object.
Describes the source and destination of a given serialized stream, and provides an additional caller-...
virtual string EnglishName
Gets the culture name in the format languagefull [country/regionfull] in English.
Contains information about the country/region.
static CultureInfo DefaultThreadCurrentCulture
Gets or sets the default culture for threads in the current application domain.
static CultureInfo [] GetCultures(CultureTypes types)
Gets the list of supported cultures filtered by the specified T:System.Globalization....
virtual TextInfo TextInfo
Gets the T:System.Globalization.TextInfo that defines the writing system associated with the culture.
Represents a resource manager that provides convenient access to culture-specific resources at run ti...
static CultureInfo GetCultureInfo(int culture)
Retrieves a cached, read-only instance of a culture by using the specified culture identifier.
Represents an application domain, which is an isolated environment where applications execute....
override string ToString()
Returns a string containing the name of the current T:System.Globalization.CultureInfo in the format ...
string IetfLanguageTag
Deprecated. Gets the RFC 4646 standard identification for a language.
static CultureInfo CurrentUICulture
Gets or sets the T:System.Globalization.CultureInfo object that represents the current user interface...
static TextInfo ReadOnly(TextInfo textInfo)
Returns a read-only version of the specified T:System.Globalization.TextInfo object.
SecurityAction
Specifies the security actions that can be performed using declarative security.
CultureInfo?? CurrentCulture
Gets or sets the culture for the current thread.
Provides information about, and means to manipulate, the current environment and platform....
void ClearCachedData()
Refreshes cached culture-related information.
static Calendar ReadOnly(Calendar calendar)
Returns a read-only version of the specified T:System.Globalization.Calendar object.
CultureInfo GetConsoleFallbackUICulture()
Gets an alternate user interface culture suitable for console applications when the default graphic u...
Finds or creates a T:System.AppDomain.
CultureTypes????? CultureTypes
Gets the culture types that pertain to the current T:System.Globalization.CultureInfo object.
UnmanagedType
Identifies how to marshal parameters or fields to unmanaged code.
static int CompareExchange(ref int location1, int value, int comparand)
Compares two 32-bit signed integers for equality and, if they are equal, replaces the first value.
Represents a collection of key/value pairs that are organized based on the hash code of the key....
virtual bool IsNeutralCulture
Gets a value indicating whether the current T:System.Globalization.CultureInfo represents a neutral c...
virtual object Clone()
Creates a new object that is a copy of the current T:System.Globalization.TextInfo object.
Implements a set of methods for culture-sensitive string comparisons.
Supports cloning, which creates a new instance of a class with the same value as an existing instance...
virtual int KeyboardLayoutId
Gets the active input locale identifier.
Format character that affects the layout of text or the operation of text processes,...
Represents type declarations: class types, interface types, array types, value types,...
static Hashtable Synchronized(Hashtable table)
Returns a synchronized (thread-safe) wrapper for the T:System.Collections.Hashtable.
bool UseUserOverride
Gets a value indicating whether the current T:System.Globalization.CultureInfo object uses the user-s...
static CultureInfo GetCultureInfo(string name, string altName)
Retrieves a cached, read-only instance of a culture. Parameters specify a culture that is initialized...
MethodImplOptions
Defines the details of how a method is implemented.
CharSet
Dictates which character set marshaled strings should use.
static CultureInfo GetCultureInfo(string name)
Retrieves a cached, read-only instance of a culture using the specified culture name.
virtual string DisplayName
Gets the full localized culture name.
static CultureInfo CreateSpecificCulture(string name)
Creates a T:System.Globalization.CultureInfo that represents the specific culture that is associated ...
virtual Calendar [] OptionalCalendars
Gets the list of calendars that can be used by the culture.
override int GetHashCode()
Serves as a hash function for the current T:System.Globalization.CultureInfo, suitable for hashing al...
static CultureInfo CurrentCulture
Gets or sets the T:System.Globalization.CultureInfo object that represents the culture used by the cu...
The exception that is thrown when one of the arguments provided to a method is not valid.
override bool Equals(object value)
Determines whether the specified object is the same culture as the current T:System....
CultureInfo(int culture)
Initializes a new instance of the T:System.Globalization.CultureInfo class based on the culture speci...
virtual string ThreeLetterWindowsLanguageName
Gets the three-letter code for the language as defined in the Windows API.
virtual DateTimeFormatInfo DateTimeFormat
Gets or sets a T:System.Globalization.DateTimeFormatInfo that defines the culturally appropriate form...
Specifies that the class can be serialized.
virtual NumberFormatInfo NumberFormat
Gets or sets a T:System.Globalization.NumberFormatInfo that defines the culturally appropriate format...
virtual Calendar Calendar
Gets the default calendar used by the culture.
The exception that is thrown when a method call is invalid for the object's current state.
virtual int LCID
Gets the culture identifier for the current T:System.Globalization.CultureInfo.
Defines text properties and behaviors, such as casing, that are specific to a writing system.
static int GetDomainID()
Returns a unique application domain identifier.
Provides information about a specific culture (called a locale for unmanaged code development)....
Provides atomic operations for variables that are shared by multiple threads.
The exception that is thrown when a method attempts to construct a culture that is not available.
CultureInfo?? CurrentUICulture
Gets or sets the current culture used by the Resource Manager to look up culture-specific resources a...
virtual object Clone()
Creates a new object that is a copy of the current T:System.Globalization.Calendar object.
static void ClearCachedData()
Clears cached time zone data.
Creates and controls a thread, sets its priority, and gets its status.