The .NET classes
| Class | What it does |
|---|---|
System.Resources.ResXResourceReader | reads a .resx: enumerates the name and value pairs (GetEnumerator, GetMetadataEnumerator); UseResXDataNodes returns ResXDataNodes instead of values, so that an entry can be inspected without being deserialised; BasePath resolves file references; ResXResourceReader.FromFileContents reads from a string. It checks the headers as described on the schema page |
ResXResourceWriter | writes the schema, the four headers and the entries: AddResource(name, value), AddMetadata, AddAlias, Generate; it chooses the form of each value by its type (string, base64 byte array, converter text, or BinaryFormatter) |
ResXDataNode | one entry: Name, Comment, FileRef, GetValue, GetValueTypeName, WriteToResourceFile |
ResXFileRef, ResXNullRef | the file reference and the null marker, see values |
ResourceReader, ResourceWriter, ResourceManager, ComponentResourceManager | the binary .resources format and the run-time lookup |
StronglyTypedResourceBuilder | makes the designer class from a resource file |
Tools
- resgen (
ResGen.exe) – the Resource File Generator: converts between.txt,.resxand.resources, and writes the strongly typed class (/str). The build’sGenerateResourcetask does the same. - al (the Assembly Linker) – makes satellite assemblies from
.resourcesfiles. - Visual Studio – the resource designer: a grid of names, values and comments with a view for strings, images, icons, audio and files; it keeps the XML and the references up to date.
- System.Resources.Extensions – a package with
PreserializedResourceWriterand a reader for the serialised entries of a.resourcesfile that does not useBinaryFormatter; the documentation names it for projects that havebinary.base64entries and cannot use BinaryFormatter. - This site’s viewer – shows the entries, the decoded values, the pictures and icons inside them, and every problem, in the browser, without running any .NET code.
Not described
Known, not yet covered
- Reference: the command-line switches of
resgenandaland the properties ofGenerateResourceare not listed.
Unknown
- Reference: none of these tools or classes was run here (no .NET SDK is installed).