So, I currently hold an instance of the ResourceManager in a static variable accessible for all classes in my solution. I’ve used it for getting translation stuff for single-threaded operation and it was working just fine and dandy.
However, I then added an operation that takes a bit longer to execute, and I need to update the progress in the UI. For the progress information strings, I also use the ResourceManager. Thing is, the same exact line of code returns null (Localization.ResourceManager.GetString(“ProgressInformation1”), for example) if it is executed on a separate thread. But if I don’t fire a new thread for it, it returns the string as expected. I checked the MSDN library, and according to it, ResourceManager should be thread-safe and all. So what am I doing wrong?
Perhaps you need to specify CurrentCulture and CurrentUICulture for the thread you run.
Just use ones from the “main” thread.