Reading and Writing RESX XML Files

Resource files, as we mentioned at the beginning of this chapter, come in several flavors—.resources files and .resx files. Resx files are the raw, uncompiled XML used as a basic source form for resources. In the previous example, we showed the ResourceReader and ResourceWriter classes. There are corresponding ResXResourceReader and ResXResourceWriter classes that can be used to maintain the XML forms of the resources.

In our last example for this chapter, we've created a simple application that lets you load chosen bitmap, text, and icon files and convert these to a .RESX resource file (see Listing 3.4.8). The complexity of the task and the simplicity of this application show off some of the raw power of the ...

Get C# and the .NET Framework: The C++ Perspective now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.