Creates a ResourceManager for looking up resources beginning with the specified root name using the Assembly manifest.
[Visual Basic] Overloads Public Sub New( _ ByVal baseName As String, _ ByVal assembly As Assembly, _ ByVal usingResourceSet As Type, _ ByVal usingSatelliteAssemblies As Boolean _ ) [C#] public ResourceManager( string baseName, Assembly assembly, Type usingResourceSet, bool usingSatelliteAssemblies ); [C++] public: ResourceManager( String* baseName, Assembly* assembly, Type* usingResourceSet, bool usingSatelliteAssemblies ); [JScript] public function ResourceManager( baseName : String, assembly : Assembly, usingResourceSet : Type, usingSatelliteAssemblies : Boolean );
Exception Type | Condition |
---|---|
ArgumentException | if usingResourceset is not a subclass of ResourceSet |
ArgumentNullException | if baseName is a null reference (Nothing) or assembly is a null reference (Nothing) |
MissingManifestResourceException | if the assembly does not contain the resources for the neutral culture |
The resources are searched for in a flat namespace. On large projects, this may lead to collisions in resource names.
The individual resources can either all be contained in the specified main assembly, or they can be contained in satellite assemblies. A satellite assembly is assumed to contain resources for a single culture specified in that assembly's metadata. The satellite assemblies are loaded if 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 subclass ResourceSet, override GetDefaultReader and GetDefaultWriter, and pass that type to this constructor.
ResourceManager Class | ResourceManager Members | System.Resources Namespace | ResourceManager Constructor Overload List