This topic has not yet been rated - Rate this topic

ComponentResourceManager.ApplyResources Method (Object, String, CultureInfo)

Applies a resource's value to the corresponding property of the object.

Namespace:  System.ComponentModel
Assembly:  System (in System.dll)
public virtual void ApplyResources(
	Object value,
	string objectName,
	CultureInfo culture
)

Parameters

value
Type: System.Object

An Object that contains the property value to be applied.

objectName
Type: System.String

A String that contains the name of the object to look up in the resources.

culture
Type: System.Globalization.CultureInfo

The culture for which to apply resources.

ExceptionCondition
ArgumentNullException

value or objectName is null.

This method examines all the resources for the provided culture. If culture is null, the current culture is assumed.

The ApplyResources method attempts to find a resource with a key in the format of objectName.propertyName, where objectName is passed in as a parameter and propertyName is the name of a property. It will then apply that resource's value to the corresponding property of the object. If there is no matching property, the resource will be ignored.

.NET Framework

Supported in: 4.5, 4, 3.5, 3.0, 2.0, 1.1

.NET Framework Client Profile

Supported in: 4, 3.5 SP1

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.

Did you find this helpful?
(1500 characters remaining)
© 2013 Microsoft. All rights reserved.