Export (0) Print
Expand All

CultureAndRegionInfoBuilder.Parent Property

Gets or sets the CultureInfo object that represents the parent culture of the current custom culture.

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

public CultureInfo Parent { get; set; }

Property Value

Type: System.Globalization.CultureInfo
The CultureInfo object that represents the parent culture of the current custom culture.

ExceptionCondition
InvalidOperationException

In a set operation, the culture value cannot be found. Possibly, the assigned value is an unregistered custom culture.

ArgumentNullException

In a set operation, the value is null.

ArgumentException

In a set operation, which traverses the ancestors of the current culture, the invariant culture cannot be found within 10 generations of ancestors.

-or-

In a set operation, a circular reference was discovered: the assigned value is an ancestor of the current custom culture.

The cultures have a hierarchy. For predefined cultures, the parent of a specific culture is a neutral culture and the parent of a neutral culture is the InvariantCulture. The parent culture encompasses only the set of information that is common among its children.

It is generally recommended that custom cultures conform to this hierarchy. However, by default, the Parent of a custom culture is the Parent of the culture on which it is based. If the application creates a culture with CultureName "en-US-MyCulture" based on "en-US", its parent is "en" because that is the Parent of "en-US". If the application uses "en-US" as the Parent of the new custom culture, it must set this value explicitly.

If the resources for the specific culture are not available in the system, the resources for the neutral culture are used. If the resources for the neutral culture are not available, the resources embedded in the main assembly are used. For more information about the resource fallback process, see Packaging and Deploying Resources in Desktop Apps.

The list of cultures in the Windows API is slightly different from the list of cultures in the .NET Framework. If interoperability with Windows is required, for example, through the platform invoke mechanism, the application should use a specific culture that is defined in the .NET Framework. This ensures consistency with the equivalent Windows locale, which is identified with the same LCID.

.NET Framework

Supported in: 4.5.3, 4, 3.5, 3.0, 2.0

.NET Framework Client Profile

Supported in: 4, 3.5 SP1

Windows 8.1, Windows Server 2012 R2, Windows 8, Windows Server 2012, Windows 7, Windows Vista SP2, Windows Server 2008 (Server Core Role not supported), Windows Server 2008 R2 (Server Core Role supported with SP1 or later; Itanium not supported)

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

Show:
© 2014 Microsoft