CultureAndRegionInfoBuilder::Register Method
Persists the current CultureAndRegionInfoBuilder object as a custom culture on the local computer and makes that culture available to applications. Requires administrative privileges.
Assembly: sysglobl (in sysglobl.dll)
| Exception | Condition |
|---|---|
| InvalidOperationException | The custom culture is already registered. -or- The current CultureAndRegionInfoBuilder object has a property that must be set before the culture can be registered. All cultures, neutral or specific, must have TextInfo and CompareInfo set. Specific cultures must also have NumberFormat, GregorianDateTimeFormat, and AvailableCalendars set. This method also throws InvalidOperationException if the following properties are not defined: |
| ArgumentOutOfRangeException | A CultureAndRegionInfoBuilder object property value exceeds its maximum length or value. |
| UnauthorizedAccessException | User does not have administrative privileges. |
The Register method stores a custom culture as a file on the local computer in the Globalization subdirectory of the directory returned by the Win32 GetWindowsDirectory function. This process is called registering the custom culture. After the custom culture is registered, a new custom culture can be created by specifying the culture name in a CultureInfo() constructor or when calling the CultureInfo::CreateSpecificCulture method.
- Full trust for the immediate caller. This member cannot be used by partially trusted code. For more information, see Using Libraries from Partially Trusted Code.
Windows 7, Windows Vista SP1 or later, Windows XP SP3, Windows XP SP2 x64 Edition, Windows Server 2008 (Server Core not supported), Windows Server 2008 R2 (Server Core supported with SP1 or later), Windows Server 2003 SP2
The .NET Framework does not support all versions of every platform. For a list of the supported versions, see .NET Framework System Requirements.