Export (0) Print
Expand All

ResourceManager.ResourceManager(String, Assembly, Type) Constructor

Initializes a new instance of the ResourceManager class that looks up resources contained in files derived from the specified root name using the given Assembly.

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

public ResourceManager (
	string baseName,
	Assembly assembly,
	Type usingResourceSet
)
public ResourceManager (
	String baseName, 
	Assembly assembly, 
	Type usingResourceSet
)
public function ResourceManager (
	baseName : String, 
	assembly : Assembly, 
	usingResourceSet : Type
)
Not applicable.

Parameters

baseName

The root name of the resources. For example, the root name for the resource file named "MyResource.en-US.resources" is "MyResource".

assembly

The main Assembly for the resources.

usingResourceSet

The Type of the custom ResourceSet to use. If a null reference (Nothing in Visual Basic), the default runtime ResourceSet is used.

Exception typeCondition

ArgumentException

usingResourceset is not a derived class of ResourceSet.

ArgumentNullException

The baseName or assembly parameter is a null reference (Nothing in Visual Basic).

The individual resource files should be contained in satellite assemblies with the invariant culture's .resources file contained in the main assembly. A satellite assembly is assumed to contain resources for a single culture specified in that assembly's manifest, and are loaded as necessary.

You can specify a ResourceSet implementation to be used. If you do not need a specific ResourceSet implementation but would like to use a custom resource file format, you should derive from the ResourceSet class, override GetDefaultReader and GetDefaultWriter, and pass that type to this constructor.

NoteNote:

The usingResourceSet parameter is used to support your own resource format, and will commonly be a null reference (Nothing in Visual Basic). This is different from the constructor that takes a Type only.

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, 1.1, 1.0

.NET Compact Framework

Supported in: 2.0, 1.0

XNA Framework

Supported in: 1.0

Community Additions

ADD
Show:
© 2015 Microsoft