Thread Safety

Any public static (Shared in Visual Basic) members of this type are thread safe. Any instance members are not guaranteed to be thread safe.

Remarks

The ResXResourceReader provides a default implementation of the IResourceReader interface that reads resource information in an XML format. To read resource information from a binary resource format, use ResourceReader.

You can use resource readers to read resource name and value pairs from .resx files. The resources can be enumerated by traversing the IDictionaryEnumerator returned by the GetEnumerator method. You can use the methods provided by the IDictionaryEnumerator to advance to the next resource and read the name and value of each resource in the .resx file.

Example

[Visual Basic, C#, C++] The following example demonstrates how to use a ResXResourceReader to iterate through the resources in a .resx file. First, the ResXResourceReaderrsxr is created for the file items.resx. Next, the GetEnumerator method is used to create an IDictionaryEnumerator to iterate through the resources and display the contents to the console.