I found this example of how to read from .resx file
public static void ReadResourceFile()
{
ResourceManager rm = new ResourceManager("XmlReadAndWritePractice.Resource1", Assembly.GetExecutingAssembly());
//String strWebsite = rm.GetString("Website",CultureInfo.CurrentCulture);
String strName = rm.GetString("FirstName");
Console.WriteLine(strName);
}
But how do I edit or add to .resx file? I found the following example but it's not what I'm expecting.
private static void CreateResourceFile()
{
// Creates a resource writer.
IResourceWriter writer = new ResourceWriter("c:\\temp\\Resource1.resx");
// Adds resources to the resource writer.
writer.AddResource("String 1", "First String");
writer.AddResource("String 2", "Second String");
writer.AddResource("String 3", "Third String");
// Writes the resources to the file or stream, and closes it.
writer.Close();
}
Resource References