Warning: file_get_contents(/data/phpspider/zhask/data//catemap/4/wpf/13.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
WPF C#编辑资源文件中的字符串_C#_Wpf - Fatal编程技术网

WPF C#编辑资源文件中的字符串

WPF C#编辑资源文件中的字符串,c#,wpf,C#,Wpf,我知道如何在普通C#应用程序中编辑字符串吗 但这在wpf中似乎不起作用,我在wpf应用程序中得到这样的字符串 ResourceManager rm = new ResourceManager(typeof(Resources)); string string1 = rm.GetString("string_key"); 如何在WPF C#中更新字符串资源 解决方案:我的坏消息是,我最近对java做了很多事情,我混合了资源 设置 您是否尝试过: 更新资源: Properties.Settings

我知道如何在普通C#应用程序中编辑字符串吗

但这在wpf中似乎不起作用,我在wpf应用程序中得到这样的字符串

ResourceManager rm = new ResourceManager(typeof(Resources));
string string1 = rm.GetString("string_key");
如何在WPF C#中更新字符串资源

解决方案:我的坏消息是,我最近对java做了很多事情,我混合了资源 设置

您是否尝试过:

更新资源:

Properties.Settings.Default.String1 = "whatever";
Properties.Settings.Default.Save();
string a String = Properties.Settings.Default.String1;
阅读资源:

Properties.Settings.Default.String1 = "whatever";
Properties.Settings.Default.Save();
string a String = Properties.Settings.Default.String1;