编辑资源文本文件 [英] editing a text file in resource
问题描述
我在C#项目增加了一个文本文件
到资源
文件。在我看到这个文件的字符串,如应用程序:恩
字符串fileContent = Properties.Resources.fileName;
我的问题是我怎么可以编辑文本文件,并使用代码保存它放回资源文件?
您也许不应该试图取消烤苹果派。
节目资源并不意味着是一个可写的数据库。您应该加载和保存在Environment.SpecialFolders.etc位置信息。
如果你必须试试这个,回答这个问题,可能会做你想要什么:修改正在运行的可执行 资源内容p>
I added a text file
to a resource
file in my c# project. In the application I see this file string like : ex.
string fileContent = Properties.Resources.fileName;
My question is how can I edit the text file and save it back into the resource file using code?
You probably shouldn't be trying to un-bake an apple pie.
The program resources were NOT meant to be a writable database. You should be loading and saving this information in the Environment.SpecialFolders.etc location.
If you "must" try this, an answer to this question might do what you want: Modifying resource contents of a running executable
这篇关于编辑资源文本文件的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!