Поделиться через


ResourceManager Constructor (Type)

Microsoft Silverlight will reach end of support after October 2021. Learn more.

Creates a ResourceManager that looks up resources in satellite assemblies based on information from the specified Type.

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

Syntax

'Declaration
Public Sub New ( _
    resourceSource As Type _
)
public ResourceManager(
    Type resourceSource
)

Parameters

Exceptions

Exception Condition
ArgumentNullException

The resourceSource parameter is nulla null reference (Nothing in Visual Basic).

ArgumentException

assembly is not a run-time object.

Remarks

The ResourceManager infers the assembly, the base name, and a namespace for.resources files from the Type. The ResourceManager assumes you will be using satellite assemblies and want to use the default ResourceSet class. Given a type such as MyCompany.MyProduct.MyType, the ResourceManager will look for a .resources file (in the main assembly and satellite assemblies) named "MyCompany.MyProduct.MyType.[culture name.]resources" in the assembly that defines MyType.

Version Information

Silverlight

Supported in: 5, 4, 3

Silverlight for Windows Phone

Supported in: Windows Phone OS 7.1, Windows Phone OS 7.0

XNA Framework

Supported in: Xbox 360, Windows Phone OS 7.0

Platforms

For a list of the operating systems and browsers that are supported by Silverlight, see Supported Operating Systems and Browsers.