editing a text file in resource

女生的网名这么多〃 提交于 2019-12-12 18:41:42

问题


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?


回答1:


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



来源:https://stackoverflow.com/questions/7122667/editing-a-text-file-in-resource

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!