CultureAndRegionInfoBuilder Class

Note: This class is new in the .NET Framework version 2.0.

Defines a custom culture that is new or based on an existing culture and region. The custom culture can be installed on a computer and subsequently used by any application running on that computer. This class cannot be inherited.

Namespace: System.Globalization
Assembly: sysglobl (in sysglobl.dll)

public sealed class CultureAndRegionInfoBuilder
/** @attribute ComVisibleAttribute(false) */ 
public final class CultureAndRegionInfoBuilder
public final class CultureAndRegionInfoBuilder

The CultureInfo class holds culture-specific information, such as the associated language, sublanguage, country/region, calendar, and cultural conventions. This class also provides culture-specific instances of the DateTimeFormatInfo, NumberFormatInfo, CompareInfo, and TextInfo classes, which are required for culture-specific operations such as casing, formatting and parsing dates and numbers, and comparing strings.

However, only the cultures predefined in the CultureInfo class are available to applications. Use the CultureAndRegionInfoBuilder class to create a custom culture that is new or overrides a predefined culture, and to install the custom culture on a computer. An installed custom culture is said to be registered on a computer, and can be used by any application running on that computer.

Note that a custom culture can be registered on a computer only by a user who has administrative rights on that computer. Consequently, typical applications cannot create a custom culture. Instead, use the CultureAndRegionInfoBuilder class to build a tool that an administrator can use to create and register a custom culture. After the custom culture is registered on a computer, use the CultureInfo class to create an instance of the custom culture just as you would a predefined culture.

Parsing Custom Cultures

If you parse a date and time string generated for a custom culture, use the TryParseExact method instead of the TryParse method to improve the probability that the parse operation will succeed. A custom culture date and time string can be complicated, and therefore difficult to parse. The TryParse method attempts to parse a string with several implicit parse patterns, all of which might fail. The TryParseExact method, in contrast, requires you to explicitly designate one or more exact parse patterns that are likely to succeed.


Any public static (Shared in Visual Basic) members of this type are thread safe. Any instance members are not guaranteed to be thread safe.

Windows 98, Windows 2000 SP4, Windows CE, Windows Millennium Edition, Windows Mobile for Pocket PC, Windows Mobile for Smartphone, Windows Server 2003, Windows XP Media Center Edition, Windows XP Professional x64 Edition, Windows XP SP2, Windows XP Starter Edition

The .NET Framework does not support all versions of every platform. For a list of the supported versions, see System Requirements.

.NET Framework

Supported in: 2.0