Compartir a través de


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
Public class Calendar Represents time in divisions, such as weeks, months, and years.
Public class CharUnicodeInfo Retrieves information about a Unicode character. This class cannot be inherited.
Public class CompareInfo Implements a set of methods for culture-sensitive string comparisons.
Public class 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.
Public class CultureNotFoundException The exception that is thrown when a method attempts to construct a culture that is not available on the local system.
Public class DateTimeFormatInfo Defines how DateTime values are formatted and displayed, depending on the culture.
Public class GregorianCalendar Represents the Gregorian calendar.
Public class HebrewCalendar Represents the Hebrew calendar.
Public class HijriCalendar Represents the Hijri calendar.
Public class JapaneseCalendar Represents the Japanese calendar.
Public class KoreanCalendar Represents the Korean calendar.
Public class NumberFormatInfo Defines how numeric values are formatted and displayed, depending on the culture.
Public class PersianCalendar Represents the Persian calendar.
Public class RegionInfo Contains information about a country/region.
Public class StringInfo Provides functionality to split a string into text elements and to iterate through those text elements.
Public class TaiwanCalendar Represents the Taiwan calendar.
Public class TextElementEnumerator Enumerates the text elements of a string.
Public class TextInfo Defines properties and behaviors, such as casing, that are specific to a writing system.
Public class ThaiBuddhistCalendar Represents the Thai Buddhist calendar.
Public class UmAlQuraCalendar Represents the Saudi Hijri (Um Al Qura) calendar.

Enumerations

  Enumeration Description
Public enumeration CalendarWeekRule Defines different rules for determining the first week of the year.
Public enumeration CompareOptions Defines the options to use with a number of string comparison methods.
Public enumeration DateTimeStyles Defines the formatting options that customize string parsing for a number of DateTime and DateTimeOffset parsing methods.
Public enumeration GregorianCalendarTypes Defines the different language versions of the Gregorian calendar.
Public enumeration NumberStyles Determines the styles permitted in numeric string arguments that are passed to the Parse methods of the integral and floating-point numeric types.
Public enumeration TimeSpanStyles Defines the formatting options that customize string parsing for the TimeSpan.ParseExact and TimeSpan.TryParseExact methods.
Public enumeration UnicodeCategory Defines the Unicode category of a character.