Returns a ResourceManager that searches a specific directory for resources instead of in the assembly manifest.
Namespace:
System.Resources
Assembly:
mscorlib (in mscorlib.dll)
Visual Basic (Declaration)
Public Shared Function CreateFileBasedResourceManager ( _
baseName As String, _
resourceDir As String, _
usingResourceSet As Type _
) As ResourceManager
Dim baseName As String
Dim resourceDir As String
Dim usingResourceSet As Type
Dim returnValue As ResourceManager
returnValue = ResourceManager.CreateFileBasedResourceManager(baseName, _
resourceDir, usingResourceSet)
public static ResourceManager CreateFileBasedResourceManager(
string baseName,
string resourceDir,
Type usingResourceSet
)
public:
static ResourceManager^ CreateFileBasedResourceManager(
String^ baseName,
String^ resourceDir,
Type^ usingResourceSet
)
public static function CreateFileBasedResourceManager(
baseName : String,
resourceDir : String,
usingResourceSet : Type
) : ResourceManager
Parameters
- baseName
- Type: System..::.String
The root name of the resources. For example, the root name for the resource file named "MyResource.en-US.resources" is "MyResource".
- resourceDir
- Type: System..::.String
The name of the directory to search for the resources.
- usingResourceSet
- Type: System..::.Type
The Type of the custom ResourceSet to use. If nullNothingnullptra null reference (Nothing in Visual Basic), the default runtime ResourceSet is used.
| Exception | Condition |
|---|
| ArgumentNullException | The baseName or resourceDir parameter is nullNothingnullptra null reference (Nothing in Visual Basic). |
This method returns a ResourceManager that is not dependent on any particular assembly. The returned ResourceManager can be used to load resources for an ASP.NET page or for testing a ResourceSet implementation.
You can specify a ResourceSet implementation. 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.
Caution: |
|---|
Using standalone.resources files in an ASP.NET application will break XCOPY deployment because the resources remain locked until they are explicitly released by the ReleaseAllResources method. If you want to deploy resources into ASP.NET applications, compile your .resources into satellite assemblies. |
Windows 7, Windows Vista, Windows XP SP2, Windows XP Media Center Edition, Windows XP Professional x64 Edition, Windows XP Starter Edition, Windows Server 2008 R2, Windows Server 2008, Windows Server 2003, Windows Server 2000 SP4, Windows Millennium Edition, Windows 98, Windows CE, Windows Mobile for Smartphone, Windows Mobile for Pocket PC, Xbox 360, Zune
The .NET Framework and .NET Compact Framework do not support all versions of every platform. For a list of the supported versions, see .NET Framework System Requirements.
.NET Framework
Supported in: 3.5, 3.0, 2.0, 1.1, 1.0
.NET Compact Framework
Supported in: 3.5, 2.0, 1.0
XNA Framework
Supported in: 3.0, 2.0, 1.0
Reference