Windows apps
Collapse the table of content
Expand the table of content
Information
The topic you requested is included in another documentation set. For convenience, it's displayed below. Choose Switch to see the topic in its original location.

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.

Exception Condition
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.

.NET Framework
Available since 1.1
Return to top
Show:
© 2017 Microsoft