Export (0) Print
Expand All

ComponentResourceManager.ApplyResources Method (Object, String)

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

Namespace:  System.ComponentModel
Assembly:  System (in System.dll)

public void ApplyResources(
	Object value,
	string objectName
)

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.

ExceptionCondition
ArgumentNullException

value or objectName is null.

This method examines all the resources for the current culture used in the development environment. It 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.

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

.NET Compact Framework

Supported in: 3.5, 2.0, 1.0

XNA Framework

Supported in: 3.0, 2.0, 1.0

Community Additions

ADD
Show:
© 2015 Microsoft