如何从richtextbox更改资源中的字符串? [英] How to I change a string from resource from a richtextbox?

查看:77
本文介绍了如何从richtextbox更改资源中的字符串?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我想使用RichTextBox中的文本修改资源中的文本

这不起作用..



我尝试过:



I want to modify a text from resource with a text from RichTextBox
This don't work..

What I have tried:

Properties.Resources.text1 = richTextBox2.Text;

推荐答案

资源存储为应用程序的一部分,不用于编辑。



根据您的要求,您可以使用资源字符串将字符串存储为配置属性(应用程序设置),而不是在那里设置。



之前也有人问过并回答过:

如何编辑资源c#中的字符串 [ ^ ]

c# - 从资源文件中读取字符串并以编程方式编辑它 - Stack Overflow [ ^ ]
Resources are stored as part of the application and are not intended for editing.

Depending on your requirements you might store the string as configuration property (app settings) using the resource string while not set there.

Such has been also asked and answered before:
How to edit string in resource c#[^]
c# - Reading string from resource file and editing it programmatically - Stack Overflow[^]


这篇关于如何从richtextbox更改资源中的字符串?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆