System.Globalization Namespace
Microsoft Silverlight will reach end of support after October 2021. Learn more.
The System.Globalization namespace contains classes that define culture-related information, including the language, the country/region, the calendars in use, the format patterns for dates, currency, and numbers, and the sort order for strings. These classes are useful for writing globalized (internationalized) applications. Classes like StringInfo and TextInfo provide advanced globalization functionalities, such as surrogate support and text element processing.
Classes
Class | Description | |
---|---|---|
Calendar | Represents time in divisions, such as weeks, months, and years. | |
CharUnicodeInfo | Retrieves information about a Unicode character. This class cannot be inherited. | |
CompareInfo | Implements a set of methods for culture-sensitive string comparisons. | |
CultureInfo | Provides information about a specific culture. The information includes the names for the culture, the writing system, the calendar used, the formatting used for numbers and dates, and the order of sorted strings. | |
CultureNotFoundException | The exception that is thrown when a method attempts to construct a culture that is not available on the local system. | |
DateTimeFormatInfo | Defines how DateTime values are formatted and displayed, depending on the culture. | |
GregorianCalendar | Represents the Gregorian calendar. | |
HebrewCalendar | Represents the Hebrew calendar. | |
HijriCalendar | Represents the Hijri calendar. | |
JapaneseCalendar | Represents the Japanese calendar. | |
KoreanCalendar | Represents the Korean calendar. | |
NumberFormatInfo | Defines how numeric values are formatted and displayed, depending on the culture. | |
PersianCalendar | Represents the Persian calendar. | |
RegionInfo | Contains information about a country/region. | |
StringInfo | Provides functionality to split a string into text elements and to iterate through those text elements. | |
TaiwanCalendar | Represents the Taiwan calendar. | |
TextElementEnumerator | Enumerates the text elements of a string. | |
TextInfo | Defines properties and behaviors, such as casing, that are specific to a writing system. | |
ThaiBuddhistCalendar | Represents the Thai Buddhist calendar. | |
UmAlQuraCalendar | Represents the Saudi Hijri (Um Al Qura) calendar. |
Enumerations
Enumeration | Description | |
---|---|---|
CalendarWeekRule | Defines different rules for determining the first week of the year. | |
CompareOptions | Defines the options to use with a number of string comparison methods. | |
DateTimeStyles | Defines the formatting options that customize string parsing for a number of DateTime and DateTimeOffset parsing methods. | |
GregorianCalendarTypes | Defines the different language versions of the Gregorian calendar. | |
NumberStyles | Determines the styles permitted in numeric string arguments that are passed to the Parse methods of the integral and floating-point numeric types. | |
TimeSpanStyles | Defines the formatting options that customize string parsing for the TimeSpan.ParseExact and TimeSpan.TryParseExact methods. | |
UnicodeCategory | Defines the Unicode category of a character. |