Export (0) Print
Expand All

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
/** @attribute ComVisibleAttribute(false) */ 
public final class CultureAndRegionInfoBuilder
ComVisibleAttribute(false) 
public final class CultureAndRegionInfoBuilder
Not applicable.

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 98, Windows Server 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 Microsoft .NET Framework 3.0 is supported on Windows Vista, Microsoft Windows XP SP2, and Windows Server 2003 SP1.

.NET Framework

Supported in: 3.0, 2.0

Community Additions

ADD
Show:
© 2014 Microsoft