Export (0) Print
Expand All
This topic has not yet been rated - Rate this topic

CultureAndRegionInfoBuilder Class

Defines a custom culture that is new or based on another culture and country/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)
[ComVisibleAttribute(false)]
public sealed 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. The application should 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, the application uses 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, the application uses the CultureInfo class to create an instance of the custom culture just as it would a predefined culture.

If your application parses a date and time string generated for a custom culture, it should 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 the application to explicitly designate one or more exact parse patterns that are likely to succeed.

System.Object
  System.Globalization.CultureAndRegionInfoBuilder
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 7, Windows Vista, Windows XP SP2, Windows XP Media Center Edition, Windows XP Professional x64 Edition, Windows XP Starter Edition, Windows Server 2008 R2, Windows Server 2008, Windows Server 2003, Windows Server 2000 SP4, Windows Millennium Edition, Windows 98

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

.NET Framework

Supported in: 3.5, 3.0, 2.0
Did you find this helpful?
(1500 characters remaining)
Thank you for your feedback

Community Additions

ADD
Show:
© 2014 Microsoft. All rights reserved.