Skip to content

Simplify.Resources

Alexanderius edited this page Jun 25, 2026 · 5 revisions

Simplify.Resources Documentation

Provides StringTable.Entry ambient context and ResourcesStringTable, IResourcesStringTable for retrieving strings from assembly resource files.

Available at NuGet as binary package

Basic Example

Retrieve a string from the executing assembly:

var str = StringTable.Entry["FooString"];

The resource file should be named ProgramResources.resx and set as Embedded Resource. The assembly's default namespace should match the assembly name.

Custom ResourcesStringTable

You can create a custom ResourcesStringTable instance with a custom assembly from which to retrieve resources:

var rst = new ResourcesStringTable(Assembly.GetAssembly(typeof(MyType)), "ProgramResources");
var str = rst["FooString"];

Specify a resources root name via the third baseName parameter (the assembly name is used by default; override it when the resources root name does not match the assembly name):

var rst = new ResourcesStringTable(Assembly.GetAssembly(typeof(MyType)), "ProgramResources", "YourResourcesRootName");
var str = rst["FooString"];

Clone this wiki locally