Export (0) Print
Expand All

ResourceManager.GetResourceFileName Method

Generates the name of the resource file for the given CultureInfo object.

Namespace:  System.Resources
Assembly:  mscorlib (in mscorlib.dll)

protected virtual string GetResourceFileName(
	CultureInfo culture
)

Parameters

culture
Type: System.Globalization.CultureInfo

The culture object for which a resource file name is constructed.

Return Value

Type: System.String
The name that can be used for a resource file for the given CultureInfo object.

The GetResourceFileName method is useful only if you write your own class that derives from the ResourceManager class.

This method uses the CultureInfo.Name property as part of the file name for all cultures other than the invariant culture. This method does not look in an assembly's manifest or touch the disk, and is used only to construct a resource file name (suitable for passing to the ResourceReader constructor) or a manifest resource blob name.

A derived class can override this method to look for a different extension, such as ".ResX", or a completely different scheme for naming resource files. Note that the method can be used to customize the name of a resource file within a satellite assembly, and not to customize the name of the satellite assembly itself.

.NET Framework

Supported in: 4.5.2, 4.5.1, 4.5, 4, 3.5, 3.0, 2.0, 1.1, 1.0

.NET Framework Client Profile

Supported in: 4, 3.5 SP1

.NET for Windows Phone apps

Supported in: Windows Phone 8.1, Windows Phone 8, Silverlight 8.1

Windows Phone 8.1, Windows Phone 8, 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