Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
如何将字符串添加到资源中。因此,当我重新启动程序时,该字符串应该在资源中。添加后如何获取?例如:
textBox1.Text = // string that I've added;
谢谢...
资源不是您问题的正确解决方案,它们旨在提供各种(语言)版本的常量字符串。在程序执行期间生成它们是可能的,但不是很容易。即使您成功生成它们,保存文件也很困难 - 它们存储在 .exe 或 .dll 文件中,这些文件可能在执行时被锁定。
使用设置。
使用我已经使用了一段时间的设置,它们工作得很好。如果要更改设置,可以这样做:
Settings.Default.YourSetting = //Something Settings.Default.Save();
At the console.log line in the render method below, it shows that this.member instance is exactly what it should be. So member object is good. I've spit out the string in tpl and it'