ResXResourceWriter::AddResource Method (String^, String^)

 

Adds a string resource to the resources.

Namespace:   System.Resources
Assembly:  System.Windows.Forms (in System.Windows.Forms.dll)

public:
virtual void AddResource(
	String^ name,
	String^ value
) sealed

Parameters

name
Type: System::String^

The name of the resource.

value
Type: System::String^

The value of the resource.

The resource is not written until Generate is called.

The following example creates a .resx file named CarResources.resx that stores six strings, an icon, and two application-defined objects (two Automobile objects). To store the strings, it calls the AddResource(String^, String^) method.

No code example is currently available or this language may not be supported.

Note that the Automobile class, which is defined and instantiated in the example, is tagged with the SerializableAttribute attribute.

.NET Framework
Available since 1.1
Return to top
Show: