Export (0) Print
Expand All

ResourceViewer Technology Sample

[This documentation is for preview only, and is subject to change in later releases. Blank topics are included as placeholders.]

This sample provides a viewer for strongly typed resources. It loads and analyzes resource files that are generated by the Resgen.exe (Resource File Generator) utility, and displays details about the resources stored in them, using a DataGridView. This sample is available only in C#.

For information about using the samples, see the following topics:

To build the sample using the Command Prompt

  1. Open a command prompt window and navigate to the ResourceViewer directory.

  2. Type msbuild ResourceViewer.sln at the command line.

To build the sample using Visual Studio

  1. Open Windows Explorer and navigate to the ResourceViewer directory.

  2. Double-click the icon for ResourceViewer.sln to open the file in Visual Studio.

  3. Choose Build Solution from the Build menu, or press F5 to build and run the sample.

To run the sample

  1. Open a command prompt window or Windows Explorer and navigate to the directory that contains the new executable.

  2. Type ResourceViewer.exe at the command line, or double-click the icon in Windows Explorer to launch and run the sample.

  3. In the sample window, choose Open Resource File from the File menu. The contents of the file are displayed in the DataGridView at left.

Note Note

If you select an empty resource file, no message is displayed to inform you of that fact. The application does nothing.

.NET Framework Version: 2.0

  • Strongly typed resources.

  • Generic collections using custom types.

  • Use of type DataGridView to display lists of values.

The sample declares and uses a custom structure named resource. It uses this structure in a generic Dictionary<TKey, TValue> to store and retrieve values from the resource file.

Show:
© 2015 Microsoft